There are several versions of python

The 3.0 version of Python is often called Python 3000, or Py3k for short. Compared with earlier versions of Python, this is a major upgrade.

In order not to bring too much cumbersomeness, Python 3.0 was not designed for downward compatibility.

Many programs designed for earlier versions of Python cannot run properly on Python 3.0.

In order to take care of the existing programs, Python 2.6, as a transitional version, basically uses the syntax and libraries of Python 2.x, while considering the migration to Python 3.0, allowing the use of some of the syntax and functions of Python 3.0.

New Python programs are recommended to use the syntax of Python 3.0 version.

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, third-party libraries that do not support Python 3.0 include Twisted, py2exe, PIL, etc.

Most third-party libraries are working hard to be compatible with Python 3.0 version. Even if you cannot use Python 3.0 immediately, it is recommended to write a program compatible with Python 3.0 and then use Python 2.6, Python 2.7 to execute.

Knowledge point expansion:

Choice of Python2 and Python3:

Because the early Python version has some shortcomings in the basic design. In 2008, Guido van Rossum re-developed Python 3.0 (known as Python 3000, or Py3k for short). Python 3 was designed to solve these remaining problems, and performance has also been improved.

However, the biggest problem with Python 3 is that it is not fully backward compatible. At that time, the backward compatible version was Python 2.6. The Python development team can't move all projects and libraries to Python 3.0 all at once.

Therefore, the two versions have entered a state of long-term parallel development and maintenance. But in terms of update speed, the update speed of Python3 is much faster than that of Python2, because Python2 is currently mainly maintenance-oriented. Python3 is the future trend.

The above is the detailed content of several versions of python. For more information about several versions of python, please pay attention to other related articles on ZaLou.Cn!

Recommended Posts

There are several versions of python
Several common modes of Python functions
What are the required parameters of python
Solve the conflict of multiple versions of python
What are the advantages of python language
Solve the conflict of multiple versions of python
Basics of Python syntax
Basic syntax of Python
Basic knowledge of Python (1)
Prettytable module of python
09. Common modules of Python3
Consolidate the foundation of Python (4)
What are python class attributes
Consolidate the foundation of Python(7)
Subscripts of tuples in Python
Python analysis of wav files
Analysis of JS of Python crawler
python king of glory wallpaper
Consolidate the foundation of Python(5)
Python implementation of gomoku program
Analysis of Python Sandbox Escape
Some new features of Python 3.10
Analysis of Python object-oriented programming
Python version of OpenCV installation
9 feature engineering techniques of Python
matplotlib of python drawing module
Python method of parameter passing
Consolidate the foundation of Python (3)
Collection of Python Common Modules