Python 3.0 is in beta with a final release coming shortly. Obviously it will take some significant time for general adoption and for it to eventually replace 2.x.
I am writing a tutorial about certain aspects of programming Python. I'm wondering if I should do it in Python 2.x or 3.0? (not that the difference is huge)
a 2.x tutorial is probably more useful now, but it would be nice to start producing 3.0 tutorials.
anyone have thoughts?
(of course I could do both, but I would prefer to do one or the other)
What is the Python equivalent of static variables inside a function?
Python Linked List
When is “self” required?
Most existing libraries will be on 2.x for a long time.
Calculate poisson probability percentage
Last year, Guido himself said that it would be "two years" until you needed to learn 3.0; there's still another year left.
How can I do synchronous rpc calls
Personally, I think it will be longer.
Is it possible to use wxPython inside IronPython?
People writing code on 2.x can learn how to use the
2to3tool and have code that works on both versions.
Size of an open file object
There is no 3to2, so code written for python 3 is significantly less valuable..
Cross platform hidden file detection
Thats not to mention how disappointing it will be for your students to learn that python 3 is not installed on their Linux computer ("
/usr/bin/python" will be python 2.x for the next 5 years, at least), that there is no django for python 3, no wxwindows for python 3, no GTK for python 3, no Twisted for python 3, no PIL for python 3...
the real strength of Python has always been in its extensive collection of libraries, and there are very few libraries for python 3 right now.. If your tutorial is well written, you should easily be able to update it to python 2.6, 2.7, and eventually python 3..
It will be useful especially since there are probably very few out there now.. the article.
Sure, the differences are great enough that most programs will need to be modified, but almost all of the modifications are straightforward (like changing
It's a very well-thought-out transition process..
Some intro level 3k stuff would probably see more general purpose use.
So unless you're tailoring this to a specific sub domain that lacks any python resources, 3k would be of greater use..
If it's a general audience, and you plan to leave it posted for a long time, I'd suggest looking forward and going with 3.0.
On the other hand if it's for a project or group that's going to be doing work in the near future, Python 2 probably make more sense..