Python's history, advantages and disadvantages

History of Python

1989 Christmas: Guido von Rossum starts writing a compiler for the Python language. February 1991: The first Python compiler (also an interpreter) was born, which was implemented in C language (the Java and C# implementation versions Jython and IronPython appeared later, as well as other implementations such as PyPy, Brython, Pyston, etc. ), you can call library functions of C language. In the earliest version, Python has provided support for building blocks such as "class", "function", and "exception handling", as well as core data types such as "list" and "dictionary", and supports module-based The expansion system. January 1994: Python 1.0 was officially released. October 16, 2000: Python 2.0 was released, which added full garbage collection and provided support for Unicode. At the same time, the entire development process of Python is more transparent, the influence of the community on the development progress gradually expands, and the ecosystem begins to form slowly. December 3, 2008: Python 3.0 was released. It is not fully compatible with the previous Python code. However, because many companies currently use Python 2.x in their projects and operations, there are many new Python 3.x The feature was later ported to Python 2.6/2.7 version.

The current version of Python 3.7.x we are using was released in 2018, and the version number of Python is divided into three segments, shaped like ABC. A represents a major version number. Generally, A is added when the overall rewrite or changes that are not backward compatible occur; B represents a function update, and B is added when a new function appears; C represents a small change (such as a bug fix) ), add C whenever there is a modification. If you are interested in the history of Python, you can check out a blog post called "A Brief History of Python".

Advantages and disadvantages of Python

Python has many advantages, which can be briefly summarized as follows.

Simple and clear, there is only one way to do one thing. The learning curve is low, and Python is easier to learn than many other languages. Open source code, with a strong community and ecosystem. Interpreted languages are inherently platform portable. Supports both mainstream programming paradigms (object-oriented programming and functional programming). Extensibility and embeddability, you can call C/C++ code, and you can call Python in C/C++. The code is highly standardized and readable, suitable for people with code cleanliness and obsessive-compulsive disorder.

The disadvantages of Python are mainly concentrated in the following points.

The execution efficiency is slightly lower, so computationally intensive tasks can be written in C/C++. The code cannot be encrypted, but many companies now sell services instead of software. This problem will be diluted. There are too many frameworks to choose from during development (for example, there are more than 100 web frameworks), and there are mistakes where there are choices.

Python application areas

At present, Python is widely used in cloud infrastructure, DevOps, web crawler development, data analysis and mining, machine learning and other fields. Therefore, it also produces Web back-end development, data interface development, automated operation and maintenance, automated testing, scientific computing and A series of positions including visualization, data analysis, quantitative trading, robot development, image recognition and processing.

Knowledge point supplement:

Advantages of Python language

1、 As a beginner who is a beginner in python, python is very simple and very suitable for human reading. Reading a good Python program feels like reading English, even though the English requirements are very strict! The pseudo-code nature of Python is one of its greatest advantages. It allows you to focus on solving problems instead of understanding the language itself.

2、 Easy to learn. Although python is written in C language, it discards the very complex pointers in C and simplifies the syntax of python.

3、 Python is one of FLOSS (Free/Open Source Software). Simply put, you can freely distribute copies of this software, read its source code, make changes to it, and use part of it in new free software. Python hopes to see a better person create and improve often.

4、 Portability-Due to its open source nature, Python has been ported to many platforms (it has been modified to allow it to work on different platforms). If you are careful to avoid using system-dependent features, all your Python programs can run on any of the following platforms without modification. These platforms include Linux, Windows, FreeBSD, Macintosh, Solaris, OS/2, Amiga, AROS, AS/400, BeOS, OS/390, z/OS, Palm OS, QNX, VMS, Psion, Acom RISC OS, VxWorks, PlayStation, Sharp Zaurus, Windows CE and even PocketPC, Symbian and Google's Android platform based on Linux!

5、 Inside the computer, the Python interpreter converts the source code into an intermediate form called bytecode, and then translates it into the machine language used by the computer and runs it. In fact, since you no longer need to worry about how to compile programs, how to ensure that the correct libraries are linked and reproduced, etc., all of this makes using Python easier. Since you only need to copy your Python program to another computer, it will work, which also makes your Python program more portable.

6、 Python supports both process-oriented functional programming and object-oriented abstract programming. In a procedure-oriented language, a program is constructed from procedures or just functions of reusable code. In an object-oriented language, programs are constructed from objects composed of data and functions. Compared with other major languages such as C++ and Java, Python implements object-oriented programming in a very powerful and simple way.

7、 Scalability and embeddability. If you need a piece of your key code to run faster or want some algorithms not to be public, you can write part of your program in C or C++, and then use them in your Python program. You can embed Python in your C/C++ program to provide scripting functions to users of your program.

8、 Rich library. The Python standard library is indeed huge. Python has definable third-party libraries that can be used. It can help you deal with various tasks, including regular expressions, document generation, unit testing, threads, databases, web browsers, CGI, FTP, email, XML, XML-RPC, HTML, WAV files, password systems, GUI (Graphical user interface), Tk and other system-related operations. Remember, as long as Python is installed, all these features are available. This is called the "full-featured" philosophy of Python. In addition to the standard library, there are many other high-quality libraries, such as wxPython, Twisted, and Python image libraries.

9、 Python is indeed a very wonderful and powerful language. It reasonably combines high performance with features that make programming simple and interesting.

10、 Canonical code. Python uses forced indentation to make the code extremely readable.

Disadvantages of Python language

In many cases, the program cannot be written in one line, such as import sys;for i in sys.path:print i. Perl and awk do not have this restriction. Simple programs can be completed in the shell more conveniently. You do not need to write the program into a .py file like Python. (This is not a limitation for many users)

1、 Running speed, if there is a speed requirement, use C++ to rewrite the key part. But for the user, the running speed on the machine is negligible. Because users can't feel this difference in speed at all.

2、 Both advantages and disadvantages. The open source nature of python is that the Python language cannot be encrypted, but at present, fewer and fewer customers are sold to customers purely by writing software in the domestic market. Websites and mobile applications do not need to provide customers with source code, so this problem is the problem . Over time, many domestic software companies, especially game companies, have also begun to use it on a large scale.

3、 There are too many architecture choices (there is no official .net architecture like C#, nor is there a relatively concentrated architecture development like ruby because of its short history. The Ruby on Rails architecture is invincible in the development of small and medium web programs). But this also shows from another side that python is better, attracts more talents and projects.

Recommended Posts

Python's history, advantages and disadvantages
Python's global variables and local variables
Python's exception concept introduction and handling
Python's jieba module installation and download