Hacker News new | ask | show | jobs
by chc 4402 days ago
Many distros include both Python 2 and Python 3 support. I think pdonis is saying that distros that support Python 3 are not stuck on 3.0. That is, their Python 3 packages are 3.2 or higher, so comparing 2.7 to 3.0 is unreasonable, since it's not a choice anyone has to make. Which seems to be true. For example, the relatively conservative Debian is currently on Python 3.2, with Python 3.3 in the next version. Ubuntu's python3 is currently 3.4. Fedora appears to be 3.2. Arch has Python 3.4, I think.

So what pdonis was saying is, as far as I can tell, true.

2 comments

They do. But python3 is not the default python.

Download a python script run it and it will run on Python 2.7.6.

Yes that OP meant to say that because he clarified it later. But I don't see how his original comment of:

> most Linux distros are at least at Python 3.2

implies that. To me that says 3.2+ ships as the default version of Python.

> python3 is not the default python.

The post I was responding to talked about books on Python for students, presumably students studying programming. Python 3 doesn't need to be the default python for students studying programming to use it; it just needs to be available. If the post had been talking about, say, sysadmins, that would be a different story.

I think it's recommended for distros to modify the shebang to /usr/bin/env python3 for script that are supposed to run under python 3, although this does pose a problem for scripts that want to run under both without modification. If the distro ships with python3 and most of the system scripts run under python3 I'd say its the default.Ubuntu for one is planning on not shipping a python2 or /usr/bin/python binary by default(although it will still be in repos) eventually.
I think 3.0 was meant to be 3.x not 3.0 specifically.