Published in News

Python 3.0 sheds backwards compatibility

by on05 December 2008

Image

Out in the wild now


The Python development community has officially released version 3.0, which is being touted as a major update.

Version 3.0 adds important syntactic improvements, better library and a wide range of other changes. It also does not work with earlier versions of Python and many of the changes in the language will require Python developers to rewrite their existing code.

For a while the team has been preparing Python users for this transition. Version 2.6, which was released in October, provided a migration glide path by introducing some new Python 3.0 features while also providing backwards compatibility.

There is also a tool called 2to3 that can automatically translate some legacy Python code so that it is compatible with 3.0. Under the bonnet there are new mechanisms for printing and string formatting. The old print statement has been abandoned and replaced with a new print function that is more consistent with the rest of the language.

Python's traditional string interpolation functionality is being phased out in favor of a new format string. All told, it is looking like a whole new code.
Last modified on 06 December 2008
Rate this item
(0 votes)