Live data from Hacker News

The Case Against Python 3

learnpythonthehardway.org

121–130 of 281 posts

Re: The Case Against Python 3

#122
post #33

I didn't know Zed Shaw was that stupid. Or is he just trolling?

He's well known for his hyperbole and ranting but he's also intelligent and usually able to back up his claims with some kind of argument. There are so many clearly false claims in this piece though I assume it's just trolling.

As I mentioned in another thread the OED's word of the year is post-truth.

Zed is clearly a modern man.

Re: The Case Against Python 3

#123
post #102

Earlier quoted context omitted.

> Suddenly print is a function? from __future__ import print_function Now you've got print function in python2. > 'yield from' won't be available on the py2 branch? And 2.6 doesn't get set literals. And 2.5 doesn't get "with" statements. And ... There's got to be a cutoff somewhere. Or we'd just have an eternal 1.0 with all the features backported to it.

Well no. The problem is that py3 breaks backwards compatibility, without really a good reason. What's so much better about it? Why couldn't they sort py2 at least for module imports? Which is exactly opposite for c++11 - it doesn't break backwards compatibility, but I really want those new features. I think if it broke backwards compatibility, I'd still switch to the new c++. At work we use py2 and c++11...

The most visible changes, such as print being a function, are the easiest and most trivial to adapt to. They clean up the language, and can be automatically converted from one to the other. This can be pulled into python 2 with "from __future__" imports.

The harder part is the string handling. In Python 2, you have one class, string, which is performing two different jobs. It is acting both as a holder for text, and as a holder for binary data. This sort of works, because ASCII looks like binary data if you squint it. If your users are English-only, then this probably sounds like a reasonable thing. Once you need to start supporting Unicode, this ambiguity causes a world of pain.

On python 3, this ambiguity is removed. You have bytes, which are binary data, and strings, which are encoded text. No longer is there one class trying in vain to represent both concepts. This is also why automatic translation doesn't work, because the translator doesn't know which concept you were trying to user when you used a python 2 string. This is a rather low level change, which is why it took libraries so long to update, and why it couldn't be done without breaking backwards compatibility.

Re: The Case Against Python 3

#124
post #111
post #72

Earlier quoted context omitted.

Yea I skimmed the rest. This makes me ashamed that I even bought the guys book (Learn Python the Hard Way). His attitude is what is going to kill python, not python 3. I moved from Perl 5 to Python 3 hoping to flee the internal dev fighting and attitudes, yet here I am again. I'll say this, at Pycon 2016 I attended some dev sprints/hackathons with the python 3 developers. Python 2 is no where on their radar, its dead…

Pypy hasn't

http://pypy.org/download.html

py3.3 support is at alpha level. py3.5 support is in the pipeline and already available for testing. It's unlikely they'll do any effort that's targeting py2 specifically anymore.

Re: The Case Against Python 3

#125
post #111
post #72

Earlier quoted context omitted.

Yea I skimmed the rest. This makes me ashamed that I even bought the guys book (Learn Python the Hard Way). His attitude is what is going to kill python, not python 3. I moved from Perl 5 to Python 3 hoping to flee the internal dev fighting and attitudes, yet here I am again. I'll say this, at Pycon 2016 I attended some dev sprints/hackathons with the python 3 developers. Python 2 is no where on their radar, its dead…

Pypy hasn't

But there is a plan and the milestones are being achieved.

Re: The Case Against Python 3

#127
As part of a data science/machine learning course, I have taught many, many beginning students how to use Python 2 and (starting a year ago) Python 3.

The reality is that given what beginning programmers learn, they hardly notice the difference between them. Adding parentheses to print() and some explicit conversions to lists are all that is necessary to convert most code that beginners see. The last I looked at Zed's book, the same is true for his coding examples.

Overall, I believe for newcomers it is more useful to learn Python 3. Given this background, no employer would reasonably believe you cannot learn Python 2 quickly. They will likely even be impressed you are future-proofed.

Re: The Case Against Python 3

#129
post #111

Earlier quoted context omitted.

Pypy hasn't

http://pypy.org/download.html py3.3 support is at alpha level. py3.5 support is in the pipeline and already available for testing. It's unlikely they'll do any effort that's targeting py2 specifically anymore.

Being in alpha isn't exactly 'having moved on' ;-)

Re: The Case Against Python 3

#130

This has to be the ne plus ultra of Python scaremongering. It describes some sort of bizzaro world of a doomed language which it populates with Machiavellian Python maintainers, brainwashed developers, and a small group of heroic holdouts who see resisting Python 3 as a moral imperative. Apparently having too many string formatting options is a moral issue (three, to be specific). As someone who writes a _lot_ of Pyt…

If you're looking for a new tutorial for beginners, I really liked "Dive Into Python 3" (http://www.diveintopython3.net/) and have had some success giving that link to new coders.
Post reply on HN