The "what's new" list looks pretty extensive. I've heard that this is considered a radical shift in the language. Any early adopters out there? Would you advise someone dipping their toes into the water to stick with version 2.x? Or dive into 3.0?
if you're just starting, by all means go with python3.0
libraries and modules will be ported in time, but you'll get cleaner syntax, better unicode support and won't need to re-learn anything later on.
it is a backward-incompatible release for a reason, don't look back.
It's not really a radical change, unless you count a change to the syntax of the print
statement as radical. It's not much more than another step the evolution of Python, but they finally took the chance to make all those minor changes that make the language incompatible with previous versions. All that means is that you can't write a script that runs on both Python 2.x and Python 3.x.
For learning the language, there's little reason to stick with 2.x. You can even use tutorials designed for version 2.x with Python 3.x, as long as you understand where the differences are. Third party addon module support will come in time. That means if you're wanting to immediately jump in with Django or some existing framework, you will need to stick with 2.x until Django updates too.
Speaking as a relative newcomer to Python, I would recommend starting with Python 2.6, for two reasons. First, many useful, third-party libraries have not yet ported and likely won't be for a few months. Secondly, the upgrade path from 2.6 to 3.0 has been designed to be relatively gentle, with a -3 compatibility flag to indicate incompatible code and a 2to3 migration utility.
There are far more Python 2.x resources out there than 3.x. Once you've got a good handle on 2.6, moving to 3.0 won't be painful.
Edit: quoting Guido van Rossum from July 2007: "Definitely learn Python 2.x ... I expect it'll be two years before you'll need to learn Python 3.0, and the differences aren't that great from a beginner's perspective: most of what you'll learn about 2.x will still hold about 3.0."
It was the jump to 3.0 that really got my interest in Python piqued. There's a lot of goodness in the new spec.
If you're just looking to dip your toes in, I'd definitely start with what's current. By the time you're up to speed, the major scripts and libraries should have been ported and ready to use.
Some people may be reticent to switch to 3.0 due to the considerable amount of changes implicated. Not every code written with previous versions of Python is compatible with 3.0 so individuals/businesses have to invest time and efforts if they want to make the switch.
However, if you're up to a fresh start then yes, go with 3.0, you'll have to make the switch someday anyway.
I've dabbled in it, but everything I write depends on at least one, and usually several, 3rd party modules. 3rd-party support is, expectedly, still pretty weak for Python 3.0.
So, if you're just getting started to learn Python - jump to Python 3. If you're trying to build an application that might need a 3rd party library at some point, I'd stick with Python 2.5 (not even 2.6 yet).
I haven't used python in years, and I only just read up on 3 because of this post. I find I like the new changes, but that's probably because I don't have anything invested in the old version at the moment. Many just seem like logical progressions of the language; python has progressed in this manner since its inception.
One thing that particularly stood out for me was the new string formatting options. They're still keeping the old c-style ("%") escaping (they'll deprecate that for Python 3.1) but they're adding a .NET style formatting ("{0}") escaping.
The thing is, they're taking the .NET style formatting in a totally new direction, which I very much like. Here are some examples...
Format is a non-static method of string:
"Hello {0}!".format("World") # "Hello World!"
Named formatters:
"Hello {name}!".format(name="World") # "Hello World!"
Complex formatter types:
"Hello {0.worldField}".format(myWorldObject) # "Hello World!"
I'm using 3.0 and it's been alright.
It was a pain to change my code to fit the 3.0 specs for urllib, but other than that, no problems.
I recently tried to start the migration to 2.6 with the end goal obviously being to make it to 3.0 down the road. In less than a few hours I realized I'll be sticking with 2.5.X for a while since many of the third party modules/libraries aren't on 2.6.
I bring this up because learners of the language will want to write 'fun' stuff using examples from various resources and those resources often will use add-ons from the community that simply aren't there for 2.6+ yet. Some haven't even decided what they are going to do with 2.6+ vs. 3.0, much less actually worked on the transition.
The general trend seems to be everyone learning 2.6, because (iirc) it takes syntax that would generate errors in 3.0 and sends out warnings, which teaches you to start changing towards that sort of idea.