Python update makes break with past
Summary
Topics
Python is widely used for web applications such as YouTube.
Python 3.0, also called Python 3000 or Py3K, is the first Python release that is intentionally backwards-incompatible, according to project founder Guido van Rossum.
"Nevertheless, after digesting the changes, you'll find that Python really hasn't changed all that much — by and large, we're mostly fixing well-known annoyances and warts, and removing a lot of old cruft," van Rossum said in a document outlining the changes.
The most significant changes include modifications to the workings of built-in objects, such as dictionaries and strings, and the removal of older features, according to the Python development team. The standard library has been reorganized in some prominent places, developers said.
In general, the changes are designed to simplify Python development and remove needless complexity that has built up over time, according to van Rossum. However, Python developers have long made it clear that the new release would necessitate changes in most Python-based applications.
"3.0 is also known as the release where we break all your code, but we're doing it for a good reason... Pretty much every program will need changes," said release manager Anthony Baxter in a keynote speech at linux.conf.au in Melbourne in February.
Baxter stressed that the shift would be some time in coming. "2.x is also not going away... We'll keep maintaining [the 2.x series] as long as there is interest and need," he said.
One of the most notable changes is turning the 'print' statement, used for all kinds of information output, into a function. "Currently print has awful syntax for doing all sorts of things," Baxter said.
He said another major change is that Unicode will now be the default. "There's a real shambles in Python at the moment when it comes to mixing Unicode and non-Unicode strings," Baxter said.
Other changes, such as altering models used for division and switching the symbols for 'not equal' from '<>' to '!=', have long been discussed in the Python community but have been held back because of fears over backwards compatibility. With the shift to 3.0, the view is: "What the hell. We're breaking the code anyway; let's fix it", Baxter said.
Talkback Most Recent of 3 Talkback(s)
-
Love Python...
I am cutting my teeth on it, I'll have to check out v3!
JoeMama_z4th Dec 2008 -
RE: Python update makes break with past
Good timing since I'm just getting into Python and these changes all seem to be well-warranted. Thanks.
vbrucewhitehead@...6th Dec 2008 -
RE: Python update makes break with past
Python is nice. Now, we have to wait for all the packages to be updated, and the packages that depend upon those packages to be updated, and....
Still, it has to be done some time, and I guess there's no time like the present.
jgeorge12001@...12th Jul
Talkback - Tell Us What You Think
The best of ZDNet, delivered
ZDNet Newsletters
Get the best of ZDNet delivered straight to your inbox




