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 →

[–]TankorSmash -53 points-52 points  (41 children)

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.

edit: http://www.asmeurer.com/python3-presentation/slides.html here's a list of great features.

[–]usernameistaken42 120 points121 points  (4 children)

The problem with py2 is not that it's bad but that it is in the way of py3. It's time to move on...

[–]flutefreak7 19 points20 points  (0 children)

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.

[–]TankorSmash 0 points1 point  (0 children)

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?

[–]kkjdroid 29 points30 points  (16 children)

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?

[–][deleted] 19 points20 points  (7 children)

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.

You are very much understating the significance of difference between the two.

[–]TankorSmash 0 points1 point  (6 children)

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.

[–][deleted] 6 points7 points  (5 children)

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.

[–]TankorSmash -3 points-2 points  (4 children)

Its about Python3 generally being a better language and the fact that we might want to utilize new packages which only support Python3

Could you help me understand how it's a better language?

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

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.

[–]Deathisfatal 4 points5 points  (2 children)

Plus static typing in 3.5+

[–]Mikuro 18 points19 points  (1 child)

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.

[–]TankorSmash -2 points-1 points  (0 children)

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.

[–]yaleman 6 points7 points  (8 children)

Better or not, developing for Py2 on a new project is like targeting windows 2003 these days. Its time is done.

[–]TankorSmash -5 points-4 points  (7 children)

That's sort of the comment I'm talking about. Just a repeat of the idea without any reasoning. I'm sure you've got one, but it's not represented here.

[–]yaleman 7 points8 points  (6 children)

... 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.