Hacker News new | ask | show | jobs
by pekk 4818 days ago
It is 2013. Why are you teaching Python 2?
2 comments

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

http://docs.python.org/3/howto/pyporting.html#use-same-sourc...

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

http://python3wos.appspot.com/

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

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