The 3.0 version of Python, often referred to as Python 3000, or simply py3k. This is a large upgrade relative to earlier versions of Python.
In order not to take in too much of a burden, Python 3.0 did not consider downward compatibility when designing.
Many of the programs designed for early Python versions are not performing properly on Python 3.0.
To take care of the existing program, Python 2.6, as a transitional version, basically uses the syntax and library of Python 2.x, taking into account the migration to Python 3.0, allowing the use of some of the syntax and functions of Python 3.0.
The new Python program recommends using the Python version 3.0 syntax.
Unless the execution environment cannot install Python 3.0 or the program itself uses a third-party library that does not support Python 3.0. Currently does not support Python 3.0 third-party library has twisted, py2exe, PiL and so on.
Most third-party libraries are striving to be compatible with Python version 3.0. Even if Python 3.0 is not immediately available, it is recommended that you write a program that is compatible with Python version 3.0 and then execute it using Python 2.6, Python 2.7来.
About the difference between the print function:
The print statement is gone and replaced by the print () function. Python 2.6 and Python 2.7 support this form of print syntax in parts.
About the differences between Unicode
Python 2 has an ASCII str () type, Unicode () is separate, not a byte type.
Now, in Python 3, we end up with a Unicode (Utf-8) string, and a byte class: Byte and Bytearrays.
Because python3.x source files use utf-8 encoding by default
This article is from the "12380959" blog, please be sure to keep this source http://12390959.blog.51cto.com/12380959/1881231
Pythonc on the difference between---2x version and 3x version