This is just my personal opinion, but I feel like this is more of a meme than an actual problem, as if they just started out on 3 and heard other people talk about how 3 is way better.
Py2 is still great, but people talk about it like it's absolutely horrible. P3 is better in a few ways but the amount of people saying like 'Py2 must die' is an exaggeration of the problem of py2 existing.
Agreed, it's not like styles in music or art or something. Limiting yourself to writing Classical music like it's 1899 doesn't hamper the music scene in the least. Maybe if a resurgence in old-school lutes caused guitars to become more expensive or something esoteric like that. Programming is different because Python is not just a language spec but an ecosystem in which the lowest user is reliant on other open source developers for the service of providing useful libraries. There exists a vast ecosystem of Python 2 libraries and a vast ecosystem of Python 3 libraries, and only a very limited number of open source developers to keep the whole thing maintained and useful. If people paid for the privilege of using Python 2 or 3 then it wouldn't matter. As an open source ecosystem though it's vitally important that the users and developers move forward together or the ecosystem will no longer be viable.
The problem with py2 is not that it's bad but that it is in the way of py3.
Totally agree that python3 would be better off if everyone forgot about 2, since I wouldn't know any better I'd love 3 as much as I love 2.
It's time to move on...
That's what I'm asking about, why is it time to move on? If someone made Python4 and changed the syntax of another common syntax, would you leave too, or would you wait for a good reason, like I'm doing for 3?
Python 2 is OK, but there's nothing that it does that Python 3 doesn't do as well or better. Why use a language that's worse in every way in which they differ?
The actual biggest reason is the new style print function. I'm lazy and making a few extra keystrokes is enough to deter me. I get that it's lazy, and I get that it's not nearly enough of a change to worry about, but since you're asking, that's a big reason.
The other side is that nowadays I don't run into any sort of unicode troubles, and that I don't seem to actually benefit too much from the yield from stuff since I'm never writing anything that would need to be a generator.
I'm trying to think of the big killer features that aren't backported to python2... F strings? I guess that's nifty.
That's an awful reasons. Like, really, really basic. With that reasoning, all your variables should be 1-3 letters long.
If it's so hard for you, get a snippet for print in your preferred editor.
If it's so hard to migrate, there's tools like 2to3 to do all that for you (The print function conversion and more).
I can understand being reticent when you have a lot of legacy code in python2 or specific libraries that are not yet ported but the horrible implementation of print is about the worse reason I can think of. It's almost a newb programmer excuse but I'm sure that's not your case.
I'm never writing anything that would need to be a generator.
sigh. The irony of being lazy but not using "lazy"
Would you mind helping me understand what killer features Python3 has that makes it unimaginably harder to work in Python2 after the fact? Doesn't seem to be too much. Unicode, yield from, F strings, something about better exceptions is all that came to mind.
Would you mind helping me understand what killer features Python3 has that makes it unimaginably harder to work in Python2 after the fact?
This question shows that you are totally missing the point. It’s not about it being harder to go back to Python2 as a result of having used Python3. Its about Python3 generally being a better language and the fact that we might want to utilize new packages which only support Python3. Python2 gets in the way of all of that while providing no conceivable benefit.
Generators, Unicode by default, keyword only arguments, division functioning the way you’d expect, advanced unpacking and probably a couple other things I’m forgetting. Though, the most compelling reason is the desire to use the latest packages which may not support an antiquated technology.
The fact is, Python 2's days are numbers. Support is ending in 2020. That is NOT a lot of time for projects to transition. If you're starting a significant project in Python 2 now, you're setting yourself up for unnecessary pain.
If you're shipping Python 2 exclusively (looking at you, Apple), you're setting yourself and your customers up for pain.
I still use Python 2 regularly (because I support Macs), and I agree that for lots of things it doesn't matter much. Python 2 works. But I'm not looking forward to tweaking everything I do in a few years when support ends. Would be nice if Apple and others at least supported both so I could transition on my own time.
Also, I don't enjoy having to explain these trivial 2-vs-3 differences to others when I teach Python, either. It's one more wrinkle in a topic that's already mind-bending for a lot of people.
Yeah teaching the difference is hard, because when someone is just starting out there's no intuitive way for them to know the difference. You always see prints not working, or input not working the way they saw in the tutorial.
As far as support ending, that doesn't mean too much to me, since it's already solid, and I'm sure that there won't be any mega-bugs that haven't already been discovered. Of course you never know.
... how about the fact that Python 2's lifecycle ends in about two years, which is stated elsewhere in the thread and ANYWHERE you bother to look regarding the topic. Do we need to return to base principles on every statement, or could we possibly assume in r/python that someone has a clue about this?
I didn't say "Py2 must die", if I was to drag your metaphor out it's on life support.
From the wiki page linked from the front page of python.org, it's been over seven years since the last major release of Py2.
Short version: Python 2.x is legacy, Python 3.x is the present and future of the language
Python 3.0 was released in 2008. The final 2.x version 2.7 release came out in mid-2010, with a statement of extended support for this end-of-life release. The 2.x branch will see no new major releases after that. 3.x is under active development and has already seen over five years of stable releases, including version 3.3 in 2012, 3.4 in 2014, 3.5 in 2015, and 3.6 in 2016. This means that all recent standard library improvements, for example, are only available by default in Python 3.x.
96
u/[deleted] Dec 14 '17 edited Dec 14 '17
As long as they don't use python 2... Edit: spelling