Python 3 is a case study on how you should never create a new version of a language implementation that can't load and interface with code written for the old version. After almost 10 years, the old version is still in use, and the new version isn't even that much better.
Most popular Python packages now support Python 3
31–40 of 166 posts
Re: Most popular Python packages now support Python 3
#32I 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.
It's been pretty great with a few exceptions in a couple weird case. And, I've only had to use the `# type: ignore` escape hatch on like less than 10 lines in a thousand roughly.
Before type hinting I was getting really down on Python and using a lot of Go. But, since then it's evened out more.
Re: Most popular Python packages now support Python 3
#33Python 3 is a case study on how you should never create a new version of a language implementation that can't load and interface with code written for the old version. After almost 10 years, the old version is still in use, and the new version isn't even that much better.
Re: Most popular Python packages now support Python 3
#34Nice work everyone! I’d be curious to see what a “Python 2 deprecation” page would look like (although deprecating Python 2 support shouldn’t be the goal of course)
For many of the major scientific libraries, the goal is to deprecate Python 2.7 no later than 2020: http://www.python3statement.org/
Re: Most popular Python packages now support Python 3
#35Python 3 is a case study on how you should never create a new version of a language implementation that can't load and interface with code written for the old version. After almost 10 years, the old version is still in use, and the new version isn't even that much better.
Re: Most popular Python packages now support Python 3
#36Earlier 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'd sooner give up regex support in python than the set type, that is how useful they are.
Re: Most popular Python packages now support Python 3
#37I 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
#38I 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
#39Clicking 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…
Huh. I know if I have a server that only has python3, Ansible can configure that server with only the python3 interpreter available. So Ansible can use python3 on the box it's configuring, but not the host it's running from?
there is experimental python3 support since 2.2 though.