Hacker News new | comments | show | ask | jobs | submit login

It is 2013. Why are you teaching Python 2?

"A programmer may try to get you to install Python 3 and learn that. You should tell them, '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."

- Zed Shaw, "Learn Python the Hard Way"

while I agree that we should be more proactive about migrating to Python 3, if you're trying to be pragmatic it is most useful to teach Python 2.7 since that is the most widely used version.

Python 3, in 2013, is not lacking in pragmatism. It's not new, or experimental. Someone just learning today is going to have to immediately turn around and relearn things because they started out with an old version.

Clearly you are not a python developer. This isn't correct at all. First, there is nearly nothing to relearn if you target 2.7.


Second, most software of any complexity will have dependencies. Although progress has been made, several packages that many projects depend upon are still red:


I'm teach Python professionally. People come to learn Python so that they can go back and use it at their work place. And almost all Python installations in productions are in Python 2. I'm sure it is going to change soon once Linux distributions make Python 3 their default version.

P.S. I'm the author of Python Primer on pythonmonk.com

I don't know anyone who uses Python 3 in production. It's still seen as an experimental implementation.

In Arch linux python 3 is default, https://www.archlinux.org/news/python-is-now-python-3/

I've seen more installs of pypy in production than python3.

Not experimental, just that there are good libraries that aren't Py3k yet.

I dont' know Python but I'm thinking about learning it. What's experimental about Python 3? I don't have any legacy reasons to start with 2.7. Why wouldn't I just start with 3?

there's nothing experimental about Python 3. its a stable release version and I think its already up to sub version 3.3.

HOWEVER, there are many important 3rd party libraries that have not yet been migrated to be fully compatible with Python 3. these libraries are far more important to writing real applications than the ability to use some newer syntactic constructs in Python 3.

> HOWEVER, there are many important 3rd party libraries that have not yet been migrated to be fully compatible with Python 3.

Are there any particular libraries blocking you? Numpy / SciPy, IPython, Requests, Django, Pyramid, Bottle, etc. have all been ported to Python 3.

South (database migration for django). Until django core has its own migration tool I won't be using it with Python 3.

PIL as well. similar reasons. django image fields are dependent on PIL.

Celery is still on Python 2 also, and while there are other message queues available, none of them is as easy to integrate with for an app that's already written in Python.

To replace PIL you should try Pillow, a fork of PIL that is capable of running on py3k (and 2.x).

The Python 3 Wall of Superpowers / Shame lists them for you in order of downloads: http://python3wos.appspot.com/

To be fair, Django only supports Python 3 as of 1.5, which was released a bit more than a month ago.

"immediately"? Try again in two-three years, if that.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact