Hacker News new | ask | show | jobs
by 51109 3829 days ago
From LearnPythonTheHardWay.org:

> A programmer may try to get you to install Python 3 and learn that. Say, "When all of the Python code on your computer is Python 3, then I'll try to learn it." That should keep them busy for about 10 years. I repeat, do not use Python 3. Python 3 is not used very much, and if you learn Python 2 you can easily learn Python 3 when you need it. If you learn Python 3 then you'll still have to learn Python 2 to get anything done. Just learn Python 2 and ignore people saying Python 3 is the future.

Besides, judging from the number of DARPA-sponsored projects that require Python 2.7, the future is not going anywhere soon.

5 comments

I'm so tired of seeing people act like LPTHW is some gospel. I tried using it to learn Python and absolutely hated it. It scared me away from Python. Especially the "don't ever use 3, use 2" thing.

And if you're going to assume that government entities use of a language is what is going to drive our market than you better stop using Python and hop back on to the ColdFusion and Fortran train.

It's not an act. LPTHW is my Bible. I retake the courses every Sunday. Saying that I should hop on the Fortran train for stating that even advanced fearless Python users opt for 2.7 is heretics!
All of my code on my machine is Python 3 and soon the python my OS is using will be Python 3.

Do we need to keep flogging this dead horse. Python 3 is here, it's big it's bold it's bloody working unless your doing the most arcanely version specific Python code.

If your extremely lazy, just use 'futurize -0 -w' and boom Python 2 and 3 compatible code 95% if the time.

My advice to new programmers is completely opposite this. I recommend that people learn Python 3 and use it until they have a specific reason not to. Most new programmers can work with Python 3 and never run into difficulty.

If someone needs to use 2.7 for a specific project, it's easy to adapt if you're well grounded in Python 3. There's no reason these days to tell beginners to start with Python 2.

I may be wrong, but IIRC, all Python code shipped by default in the next Ubuntu will be Python 3.

Now may be a great time to start with 3 and never look back.

Yes. 2.7 won't be in the default install of 16.04. Although 2.7 will still be installable of course.
So why is this good advice - a hard recommendation against something ideally comes with a reasonable explanation for why.
It is good advice, because it works. You can give reasonable explanations for Python 3, involving politics, the future, and dead languages, while still having your students be confused when Google releases TensorFlow with only 2.7 support. Hard language is his style. He loathes anything that gets in the way of being a productive programmer. See: http://programming-motherfucker.com/
So in general I should never move to a new software technology until all software with the old no longer exists?
You should do whatever makes you happy and productive. So install 2.7 and ignore the people who say 3 is the future (unless you can work better in 3).
Hang on, the advice given is not "do whatever makes you happy and productive.", the advice given is "never use Python 3 until every line of Python code on your computer is written with Python 3".

And please explain why to ignore people who say Python 3 is the future, I don't understand why.

I thought you were asking me a (loaded) question. The advice given was not "never use Python 3 until...", that was a suggested reply to people telling newcomers to go for Python 3. Perhaps too tongue-in-cheek, but coming from someone who taught millions of people Python, worth noting.

You ignore people who say that Python 3 is the future, because it will make you happy and more productive when you can run modern libraries that have a 2.7 requirement. Or you don't ignore them, and get into endless debates about how almost all libraries support 3, and that you need to spend just 1 in 20 days of your time worrying about getting your code to work, instead of... programming. But if that makes you happy, you should do that.