At this writing, both Python 2.7 and Python 3.4 are officially maintained implementations. Although upward compatibility has been maintained for most of the history of the language, the 3.0 version was an exception: it is a more elegant and cleaner language that finally removed support for a number of misfeatures from the language's early days, but is fundamentally the same language.
If you are using 2.x releases of Python, there is no hurry to convert to the 3.x series. Release 2.7 is guaranteed to be around for many years. Furthermore, there are tools to help you automate much of the conversion process. Notes throughout this document will discuss specific features of 2.7 that are intended to ease the transition.
For a discussion of the changes between 2.7 and 3.0, see What's New in Python.
To see what changes must be made in your program to allow automatic conversion to Python 3.x, run Python with this flag:
To convert your program to Python 3.x, first make a copy of the original program, then run this command:
-w flag replaces
with the converted 3.x
version, and moves the original to “
For more information on the conversion process, see the documentation for the 2to3 utility.
For full documentation of the current Python 3.x version, see the online documentation.