Python for new users
In the 'PEP453 ready for pronouncement' thread, Donald said
Because reality is that new users are still likely to be using Python 2.7. Python 3 is just now starting to be really usable, however there's a huge corpus of existing tutorials, course work, books etc for Python 2.7. As Python 3 becomes more usable that existing corpus of material will be ported over to Python 3 but in the interim there is still a pretty large hurdle for new users to get over.
And Guido replied
Based on my day-to-day experience this is still very true. (And yes, I'm slowly turning the tide. But it will take a long time and I am committed to giving users the choice.)
Widely-used and linked web resources tend to persist for a very long time, so we shouldn't use the prevalence of Python 2 resources as a reason for excessive caution. The key question is how much good material is available based on Python 3 - and this has improved significantly over the past couple of years. The classic "How to Think Like a Computer Scientist" has an excellent Python 3 version available at http://interactivepython.org, for example.
Things are changing with print media, too. Pragmatic Programmers are about to publish the 2nd edition of "Practical Programming", based on Python 3. Most of the major academic publishers have released Python 3 books in the last 12 months. The tide is definitely turning, perhaps has already turned.
Encouraging the continued use of 2.7 for existing programmers is entirely justifiable, but for *newcomers* to programming I think it is now much harder to justify. A stronger case could have been made a couple of years ago, when many important packages were not yet available for Python 3, but things have changed. Even big frameworks like Django are now usable with Python 3. If we aren't yet past the point where package availability shouldn't be regarded as an adoption barrier by beginners, we are surely very close.
I've been teaching Python as a first language to university students for many years now, initially with Python 2 and for the last few years with Python 3. In my experience, they encounter fewer problems with Python 3 (just as Guido intended, no doubt :) The one stumbling block in the past has been package availability for project work, but I don't expect that to a problem this year. All of the web and GUI development work that they'll be doing with me, for example, will be done entirely in Python 3.
Nick Efford writes:
Widely-used and linked web resources tend to persist for a very long time, so we shouldn't use the prevalence of Python 2 resources as a reason for excessive caution. The key question is how much good material is available based on Python 3 - and this has improved significantly over the past couple of years.
No, it really isn't, at least it's not more key than some other questions. Educators like you, and like me, who are in a position to teach pretty much what we want are somewhat limited by that (but it's really not that hard to take your favorite Python 2 tutorial and port it to Python 3) will certainly consider that the key question -- we can't spend all our time on one class.
But there's another kind of educator, the consultant who goes into a company (or perhaps comes from their training department) who will need to teach the gory details that differ because they matter to the applications the trainees will be maintaining and extending.
And of course self-taught programmers are likely to use something time-tested and recommended by their peers.
I agree that the prevalence of Python 2 materials *per se* is not a reason for *excessive* caution, but I suspect if you look closely you'll discover that new ones are being produced and old ones revised and enhanced. I'll personally be interested to see what happens in the next revision of *Python Essential Reference* for example. (And so will Nori: http://turnbull.sk.tsukuba.ac.jp/media/Nori-swears-by-Python-Essential-Refer...)
Encouraging the continued use of 2.7 for existing programmers is entirely justifiable,
I would disagree. Programmers should not be discouraged from using any version of Python that is needed for compatibility with existing practice, but where possible with reasonable effort, the most recent version of Python 3 should be encouraged.
Stephen J. Turnbull