By Forrest Cook
October 7, 2008
Version 2.6 of the Python language was
announced
on October 2, 2008.
A.M. Kuchling's extensive
Whats New in Python 2.6 document covers the main goal of this
release:
"The major theme of Python 2.6 is preparing the migration path to Python 3.0, a major redesign of the language. Whenever possible, Python 2.6 incorporates new features and syntax from 3.0 while remaining compatible with existing code by not removing older features or syntax. When its not possible to do that, Python 2.6 tries to do what it can, adding compatibility functions in a future_builtins module and a -3 switch to warn about usages that will become unsupported in 3.0."
Python 2.6 marks some changes in the language's development process:
"While 2.6 was being developed, the Python development process underwent two significant changes: we switched from SourceForges issue tracker to a customized
Roundup
installation.."
Python 2.6 also included a switch to the
reStructuredText
documentation format via the
Sphinx Python documentation generator. A.M. Kuchling explains the reason for the move:
"The Python documentation was written using LaTeX since the project started around 1989. In the 1980s and early 1990s, most documentation was printed out for later study, not viewed online. LaTeX was widely used because it provided attractive printed output while remaining straightforward to write once the basic rules of the markup were learned.
Today LaTeX is still used for writing publications destined for printing, but the landscape for programming tools has shifted. We no longer print out reams of documentation; instead, we browse through it online and HTML has become the most important format to support."
Numerous changes have been made to the Python language
and its large collection of modules.
Many of these changes came through the
Python Enhancement Proposal (PEP) system including:
-
PEP 343: the "with" statement.
-
PEP 366: main module explicit relative imports.
-
PEP 370: per-user site-packages directory.
-
PEP 371: addition of the multiprocessing package to the standard library.
-
PEP 3101: advanced string formatting.
-
PEP 3105: make print a function.
-
PEP 3110: catching exceptions in Python 3000.
-
PEP 3112: byte literals in Python 3000.
-
PEP 3116: new I/O library.
-
PEP 3118: revising the buffer protocol.
-
PEP 3119: introducing abstract base classes.
-
PEP 3127: integer literal support and syntax.
-
PEP 3129: class decorators.
-
PEP 3141: a type hierarchy for numbers.
Many new modules were added and a lot of existing modules were extended
in Python 2.6.
The list includes: ast (abstract syntax tree), future_builtins,
json (JavaScript object notation), plistlib (property list parser),
ctypes, and ssl.
A number of modules were deprecated in this release,
including: audiodev, bgenlocations,
buildtools, bundlebuilder, Canvas, compiler, dircache, dl, fpformat,
gensuitemodule, ihooks, imageop, imgfile, linuxaudiodev, mhlib, mimetools,
multifile, new, pure, statvfs, sunaudiodev, test.testall, and toaiff.
Finally, there were many minor module changes, C API changes,
optimizations, interpreter changes and platform-specific changes to
Python 2.6. Python continues to be a live and evolving language,
this release represents a fairly large set of changes that will pave
the way forward to Python 3.
(
Log in to post comments)