| > I'd suggest you learn both. I'd suggest OP learns Python 3 and try really hard not to look at Python 2 ever, which hopefully shouldn't be too hard in 2017. > as long as you can write Python 2/3 compatible code Maintaining a Python 2 and 3 compatible codebase in a PITA. OP wants to learn a new language, presumably to build things with it. But your advice is that they acquire insight of all the mistakes of a language that was released 7 years ago (that's for 2.7, 2.0 was release in 2000) and will reach end-of-life in 2 years.
I'd really like to understand why in the world you would want to learn Python 2 and its “warts“, to then discover that all this stuff are just unnecessary pain points that were removed/refactored/cleaned up in Python 3.
In my opinion, Python 2 and 3 are two different languages and should be treated like so. > [not] doing your users a favor, if you go exclusively Python 3 Actually you are. If you start a project today and make it Python 2 + 3, you are forcing your users (most of whom in 2017 would be proud Python 3 users anyway) to cope with a. all the bugs introduced by the compat code you have to write and b. the delayed releases/bugfixes caused by the subtle Python 2/3 discrepancies you'll face one day or the other. I will make no comment on the IE6 comparison: this isn't about corporate employees or banking apps from the 90's. |
I maintain multiple Py 2-3 compatible codebases, both academically and commercially. It's not hard, because I develop in Python 2, while writing Python 3 compatible code.
Python 2 is a beautiful language as powerful as:
There is nothing a beginner can't do in Python 2 that he/she can do in Python 3.If Python is a different language and should be treated like so, then I don't want to switch to this other language, or have a project support two different languages (I'd switch to Go if having to switch languages). For all intents and purposes: Python 2 works just fine. Google did not need Python 3 when they first released TensorFlow a year back.
> If you start a project today and make it Python 2 + 3
Then you are compatible will the largest amount of users. That's what matters to me: Somebody on a fresh install being able to pip install my library, no matter if it is Python 2.7+ or 3.4+. All other reasons are politics.
> this isn't about corporate employees or banking apps from the 90's.
No, it's about banking apps from the 00's and 10's.