I would like to know if fellow HNers who regularly code in Python are using f-strings and type hints in your production code or otherwise. I often find myself inclined to use type hinting.
Most popular Python packages now support Python 3
21–30 of 166 posts
Re: Most popular Python packages now support Python 3
#22It's the applications and plugins that still need work. Here's the status in Fedora: http://fedora.portingdb.xyz
And history: http://fedora.portingdb.xyz/history/?expand=1
Re: Most popular Python packages now support Python 3
#23I would like to know if fellow HNers who regularly code in Python are using f-strings and type hints in your production code or otherwise. I often find myself inclined to use type hinting.
Re: Most popular Python packages now support Python 3
#24Yup at this point there is no reason to not use Python 3 for new projects. What I'm finding actually is that some companies that have their codebase in Python 2 have actually started migrating to Golang rather than Python 3, because of the increased performance benefits. I'm kind of sad about this, but I think that Golang will eventually replace Python as the go-to back-end server language (maybe even data processing…
As much as a I like Go in general, there are two pythonic things that, IMO, really should go into the next major revision. 1: sets; in this day and age, not having sets as native, stdlib-provided data types is simply unacceptable.[ß] 2: The ease of python's "in" keyword; being able to test for a key in a map (or set!) without any indirection is crucial ß: granted, IIRC python moved sets into native stdlib types only…
Re: Most popular Python packages now support Python 3
#25I would like to know if fellow HNers who regularly code in Python are using f-strings and type hints in your production code or otherwise. I often find myself inclined to use type hinting.
Re: Most popular Python packages now support Python 3
#26Earlier quoted context omitted.
As much as a I like Go in general, there are two pythonic things that, IMO, really should go into the next major revision. 1: sets; in this day and age, not having sets as native, stdlib-provided data types is simply unacceptable.[ß] 2: The ease of python's "in" keyword; being able to test for a key in a map (or set!) without any indirection is crucial ß: granted, IIRC python moved sets into native stdlib types only…
Sets, if you mean a collection that contains no more than 1 of something, are easy. Use a map with struct{}{} values. If ordering is important, it's ~30 lines of simple code to encase a slice and a map in a struct and define your desired interface. Testing for a key's existence is easy as well. Accessing a map returns two variables--the 1st is the value itself. The 2nd variable is that "exists" variable you're asking…
I think parent is looking for a native set type (which I agree with). I don't know if it has a place in golang, but I always sigh and roll my eyes when I have to implement a set in most languages.
Re: Most popular Python packages now support Python 3
#27Clicking around, those that don't seem to be: 1. Obsolete. Either explicitly so (e.g. Google API) or abandoned, without even a minor/patch release (initools, 2010) or in some cases a code commit (e.g. pathtools, 2012) for five years or more. I suspect that they will never be Py3, the community will just move on to alternatives. 2. Working hard to bring support (e.g. ansible). 3. Part of the graphite ecosystem. If the…
Re: Most popular Python packages now support Python 3
#28I would like to know if fellow HNers who regularly code in Python are using f-strings and type hints in your production code or otherwise. I often find myself inclined to use type hinting.
I'm still on on Python 3.5, probably will be until Ubuntu 18.04 comes out.
Re: Most popular Python packages now support Python 3
#29I would like to know if fellow HNers who regularly code in Python are using f-strings and type hints in your production code or otherwise. I often find myself inclined to use type hinting.
New code at Facebook does use both. Instagram uses both extensively.
Re: Most popular Python packages now support Python 3
#30After almost 10 years, the old version is still in use, and the new version isn't even that much better.