History of Python: Difference between revisions

Content deleted Content added
No edit summary
Timeline and compatibility: Update and clarify information on parallel releases of, and development for, versions 2 and 3.
Line 61:
===Timeline and compatibility===
Python 3.0 was released on December 3, 2008.<ref name="3.0-release"/>
The Python 2.x and Python 3.x series arewere planned to coexist for several releases in parallel, wherewith the 2.x series existsexisting largely for compatibility and with some new features being backported from the 3.x series.<ref name="pep-3000" />
Python 2.6 was released to coincide with Python 3.0, and included some features from that release, as well as a "warnings" mode that highlighted the use of features that were removed in Python 3.0.<ref name="pep-361">{{cite web |url=http://www.python.org/dev/peps/pep-0361/ |title=PEP 361 -- Python 2.6 and 3.0 Release Schedule |author1=Neal Norwitz |author2=Barry Warsaw |date=2006-06-29 |accessdate=2012-10-07 }}</ref>
Similarly, Python 2.7 coincided with and included features from Python 3.1,<ref name="whatsnew2.7">{{cite web |url=http://docs.python.org/release/2.7/whatsnew/2.7.html |title=What’s New in Python 2.7 |author=A.M. Kuchling |date=2010-07-03 |accessdate=2012-10-07 |quote=Much as Python 2.6 incorporated features from Python 3.0, version 2.7 incorporates some of the new features in Python 3.1. The 2.x series continues to provide tools for migrating to the 3.x series. }}</ref> which was released on June 26, 2009.
Python 2.7 was the last release in the 2.x series;<ref name="pep-404">{{cite web |url=http://www.python.org/dev/peps/pep-0404/ |title=PEP 404 -- Python 2.8 Un-release Schedule |author=Barry Warsaw |date=2011-11-09 |accessdate=2012-10-07 }}</ref> parallel releases ceased as of Python 3.2.
 
Python 3.0 broke [[backward compatibility]]. There was no requirement that Python 2.x code would run unmodified on Python 3.0. There were basic changes such as changing the print statement into a print function (so any use of print as a statement will cause the program to fail), and switching to Unicode for all text strings. Python's [[dynamic typing]] combined with the plans to change the semantics of certain methods of dictionaries, for example, made perfect [[source-to-source compiler|mechanical translation]] from Python 2.x to Python 3.0 very difficult. However, a tool called "2to3" could do most of the job of translation, pointing out areas of uncertainty using comments or warnings. Even in an alpha stage, 2to3 appeared to be fairly successful at performing the translation.<ref>Sam Ruby, [http://intertwingly.net/blog/2007/09/01/2to3 2to3], September 1, 2007</ref> TheFor projects requiring compatibility with both the 2.x and 3.x series, the Python development team recommendsrecommended keeping one source (for the 2.x series), and producing releases for the Python 3.x platform using 2to3. TheEdits resultingto codethe shouldPython not3.x becode editedwere untildiscouraged thefor programso nolong longeras the code needsneeded to run on Python 2.x.<ref name="pep-3000" />
 
Python 2.6 includes forward compatibility features, as well as a "warnings" mode that will warn of potential transition problems. Warnings will be reported for builtins which no longer exist in 3.0, as well as various old Python 2.x features that Python 3.0 removed (see [http://www.python.org/dev/peps/pep-0361/ PEP 361] for more information).
 
===Features===