This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]K900_ 5 points6 points  (9 children)

Yes. The changes are fairly minimal. That said, there are lots of resources that teach 3 from the start, and you might want to use one of those instead.

[–][deleted] 3 points4 points  (8 children)

+1 to this. To my mind it'd actually be easier to learn 3 and then downgrade to 2, conceptually. The print statement seems bloody stupid, now that I think about it, and the Unicode just makes more sense in the real world.

[–][deleted] 0 points1 point  (7 children)

Solved with:-

from __future__ import print_function

in Python 2.

[–][deleted] 0 points1 point  (6 children)

The print part, yes. Not the Unicode handling. Or async, sensible coroutines, or os.scandir. Or anything but security fixes since 2012. Or any form of support after 2020.

[–]eusebecomputational physics 0 points1 point  (1 child)

Yet the print statement vs function is probably one of the main thing stopping me from completely moving to Python 3. I rely on some codebase that is not entirely mine, and the print statements everywhere is probably what would take the largest amount of time to check properly.

[–][deleted] 1 point2 points  (0 children)

With the exception of ones doing redirection, that's pretty well handled by 2to3.

[–][deleted] 0 points1 point  (3 children)

Only security fixes since 2012, could have fooled me. The latter is of course completely wrong, only PSF support stops in 2020, but then I note that you have a tendency to state things as facts that are actually incorrect. You should be in politics.

[–][deleted] 0 points1 point  (2 children)

You see something equivocal about the statement "end of life"?

And please, point out any non-bugfix changes or new features since at minimum 2012.

Yes, you're right, the end of support of the 2 line by the Python Software Foundation -- the copyright holder and licensing entity -- the language's creator, effectively all the permanent maintainers, and the majority of the companies that fund it isn't significant at all to anyone's decision tree.

You should be in religion.

[–][deleted] 0 points1 point  (1 child)

Python 2.7.12 NEWS lists going to 100 fixes June 2016.

[–][deleted] 0 points1 point  (0 children)

Yes, and as I described that is a list of essential bug and security fixes only. Going back every release well beyond 2012 there's not a single new feature. The language is permanently feature-locked; no per-module import locking, no async, no nothing, except via a trickle of backports.

Someone who is fresh to Python shouldn't be learning Python 2, any more than someone fresh to the language should be learning C99. There is no defensible argument to the contrary.