Last of Python 2.x language line moving forward

Python 2.7, expected to be the last major version of the 2.x series of the dynamic language, was released as a second alpha earlier month by the Python Software Foundation, with the final release set for June.

Two  beta version of Python 2.7 and two release candidates are expected in the meantime, said Steve Holden, chairman of the foundation, on Thursday.

[ Python is one of the scripting languages sparking a new programming era. ]

Developers of the popular dynamic language have been maintaining two separate lines, the 2.x and 3.x series.  When 2.7 is released, the 2.x line will move into five years of a bug fix-only mode.  Python 3.0 was released in December 2008 and was intentionally incompatible with the 2.x line.

"Basically, Python has a very good compatibility story over a long period of time, but [Python founder] Guido van Rossum has always been aware that there have been some warps [or inconvenient features] in the language, so he allowed himself just a one-time break in compatibility," said Holden.

"We didn't want to stick our users [with having] to do a fast migration to an incompatible language, and that's why the 2 series has continued to be developed," he said.

Featured in the 2.7 release are improvements first offered in Python 3.1, including an ordered dictionary type and unit test features like test skipping and new assert methods. A faster IO module is included along with automatic numbering of fields in the str.format()  method. New syntax is offered for nested with statements.

Other features include Float repr improvements; repr is used to generate string representations of objects. "Basically, we've just achieved more consistency now," Holden said.

Tile support for the Tkinter Python interface is featured as is a backport of the memory view object from Python 3.x.

Python has been popular in Web development but also for applications in areas like scientific computing, Holden said. "It's not purely a Web language," he said.

Python 3.2  is due in alpha versions beginning in June, followed by beta and release candidate versions, with a final version due December 11.

The language is now going into a two-year "grammar freeze," so 3.2 will not introduce new language features, said Holden. "This is primarily to allow other implementations (Jython, IronPython, PyPy, etc.) to bring their releases up to the same standard, again providing a better compatibility story for end users," said Holden.

The Python 3.x line was developed as a result of a desire to fix problems with the original design.  It offers capabilities such as internationalization via Unicode as well as alterations such as a new I/O library for better compatibility across operating systems. It also changes the print statement into a function.

The foundation has offered a tool for moving applications from Python 2.x to 3.x and a migration strategy has been published for developing for both languages from a common code base, Holden said.

This story, "Last of Python 2.x language line moves forward," was originally published at Follow the latest developments in application development at

This story, "Last of Python 2.x language line moving forward" was originally published by InfoWorld.

Copyright © 2010 IDG Communications, Inc.

7 inconvenient truths about the hybrid work trend
Shop Tech Products at Amazon