I learned Python from Python 3, and it hasn't hindered me at all, even from going back and working on Python 2 code bases, or cross compatible code bases. It's a perspective that's made me just how aware of how awful Python 2 is in comparison.
Python 2 is going to exist for a long time in a lot of places. But it's a dead end for improvements. It's a dead end for innovation. It's a dead end for bug fixes and security fixes. Would you even consider telling someone to go learn any other language that is 3 years away from even end of life support having the plug pulled? You wouldn't. Why would you do the same for Python 2?
One the one hand I have this from you, an anon as far as I'm concerned. On the other I have Google, filled with some of the world's best python developers (and until recently the BDFL Guido van Rossum himself). Google App Engine still doesn't support Python 3.
Um, yes it does: https://cloud.google.com/python/quickstarts
It should probably be updated to say that unless you have a VERY strong reason to use 2.7, use 3. And even then, probably still use 3, because your reasons probably aren't as strong as you think they are.
EDIT: Generally the strong reasons most people had for using py2.7 for new projects were some variant of: "X, Y and Z libraries I need only support 2.7". But now and days, that actually stands as more of a reason to find alternate libraries.
- code that has to run on HostGator shared hosting. They only support Python 3.2, the "maximally incompatible" version.
- code that has to run on ROS, the Robot Operating System. ROS is a huge collection of packages from various sources glued together by a message passing system. Efforts to convert all those packages to run under Python 3 have been underway for years, but aren't done yet.
In those cases, one can, without too much effort, write forward-compatible python 2 code at least.
Do you need to use packages that only support Python 2 and there are no alternatives? Use Python 2.
Otherwise? Use Python 3.
If someone doesn't know whether they should be using 2 or 3, they should be using 3.
It would seem that the article is out of date and there is now a clear path forward. However, I think that we also see here a problem with the BDFL model of programming language governance. Unless Python 3 is somehow well over 2X times more productive than Python 2, I don't see the amount of disruption caused by the change as having been worth it. Is that the case?
I'm not a particularly advanced user of python (seriously, just ops scripts), but it looks like it's basically 'all sticks' to me. I've heard people grateful about better unicode handling, but not much more than that.
You could argue that the reason folks didn't adopt 3.x quickly was that the core devs stayed committed to 2.x.
It's standard practice for software maintenance to work on both the old version and the new fork for a while, giving users a chance to switch. Look at how Microsoft manages versions of Windows. I think the Python devs stand out in their willingness to work on both versions for so long.
What does a "clear path forward" mean in the context of a programming language? In what way does python not have one?
>yet the choice will decide the future and success of their app
No it won't. I would argue that programming language choice generally has little effect on success, but it has even less effect when the languages are as similar as python 2 and 3.
>rewrites of python 2 code
Hardly a rewrite, I presume. They would need to change their syntax in some places, change package names in others, and any place they've dealt with strings might require some fiddling, but overall it would be relatively easy. Much easier than a rewrite at least.
You don't have to choose. For new projects, Python 3 has been the way to go for many years now[1][2].
[1] PSF wiki guidelines https://wiki.python.org/moin/Python2orPython3
[2] Snapshot of the same page from 2011, clarifying that "Python 3.x is the present and future of the language": https://web.archive.org/web/20110902011248/http://wiki.pytho...
Python 2's official support ends in 2020.
How can you ask someone new to the language to just choose? Well they don't have to choose. They just choose Python 3. That's what it says on the Python website. It's what everyone in the community says.
I would like to consider python for my next project, but this is extremely short sighted advice which begs the very real question: why should I consider python at all for a new, multi year project when there is no clear path forward for the language and there hasn't been in a decade?
Also, how can you ask someone who is new to the language to just choose? To me that seems insane. They have nothing to base their choice on, yet this choice will decide the future and success of the app. No pressure. But to be honest, and I know this is not the community's intention, the python 2/3 split is about as unwelcome a reception to a programming language as I can imagine. Is there a more logical way to choose?
Finally, I've now seen clients demand rewrites of python 2 code because of (probably bullshit) concerns around its obsolescence and lack of security. Now these clients generally don't know python from their ass and I doubt they have valid technical concerns but as invalid as their concerns probably are, it's still a major issue of your big clients threaten to leave unless you rewrite all your python 2 to 3. Anyone faced this?