What is Python?

      Python is a programming language, its name comes from a comedy. Perhaps this was originally designed Python language Python people do not think today would get so widely used in industry and research. The famous free software author Eric Raymond in his article "How to become a hacker" in the Python programming language as one of the four hackers should learn, and recommended that people start learning from the Python programming. This is indeed a pertinent suggestions, for those who never studied computer programming or not a professional programming learners, Python is one of the best choices. Python first learned Python, I only took less than twenty minutes, standing in a bookstore to teach people to learn programming beginner Python book turned again. Also since then, I began to be attracted this magic language.

    Python can be used to develop something on symbian.

    The perfect combination of speed and ease of use is a Python language is easy to use, many people will be novice Java Java's CLASSPATH hangs up, spend half the time to thoroughly understand CLASSPATH turned out to be wrong only their own Hello World It can not run. Python does not have this problem with, as long as can be fitted directly.

    Python is a scripting language that can be written to run directly, eliminating the trouble of compiling links, the need for more hands-on practice of beginners, which is less chance of error. And there is a Python interactive way, if it is a simple piece of small programs, even the editor can be saved, can be run directly into the knock. Python is a clear language, with indentation to represent the nesting of the program can be described as an initiative to upgrade past the soft programming style rigid grammatical rules. No longer need to choose between different styles, different styles no longer need to dispute. And different Perl, Python is not a variety of obscure abbreviations, you do not need to memorize the meaning of various strange symbols. Programs written in Python is easy to understand, this is the consensus of many people. Python is an object-oriented language, but it's not like C ++ object-oriented concepts as stressed, but pay more attention to practical. Not in order to reflect the full support of the concept and the language was very complicated, but with the easiest way for programmers to be able to enjoy the benefits of object-oriented, which is what Python can be like Java, C # attract as many supporters one of the reasons.

    Python is a feature-rich language, it has a strong base class library and the number of the many third-party extensions that Python programmers do not need to envy the Java JDK. Python provides a wealth of basic facilities to the programmer so that people do not need all the ground up when writing programs. Here, people usually use a concern: scripting language is generally slow. Scripting language that runs from the speed will be slower indeed speak, but Python's speed a lot faster than people think. Although Python is a scripting language, but in fact it can be compiled, as compiled Java programs, like Python program will be compiled into a special ByteCode, the program runs, the execution is ByteCode, eliminating the need for program analysis of the text interpretation, a lot of natural speed upgrade. In the Java programming is that people encouraging to see a Pure Java way, in addition to the virtual machine all things are written in Java, whether it is the basic data structure or a graphical interface, and the Pure Java SWING, has become a nightmare for many Java application developers . Python is advocating practical, its overall environment in C to write, a lot of basic functionality and expansion modules are written using C / C ++, and when the implementation of this part of the code, its speed is C speed. With common desktop applications written in Python, and its startup speed of programs written in C is not very different. In addition to these, by some third-party software package, written in Python source code can also be run in a similar way to JIT, which can greatly improve the operating speed of Python code, for different types of code, there will be 2 to 100 times not and other speed improvements.

    Python is the most perfect a language I have ever seen, on the ease of use and speed combination, through the loss of a little often negligible operating speeds resulting in higher programming efficiency, and this is the reason I chose Python's . To focus on the problem to be solved select a suitable language, to make you concentrate on the limited on most issues need to be resolved. Different languages have different roles, C and assembler for writing system software, if you use them to write enterprise applications, I am afraid not many people can be handy. I've encountered a database program written in assembler brother, although the most basic function is complete, but to increase a preview of what the report, he would not be able to deal with. Clever programmers with the right tools to complete the task, looking for a master key is unlikely. Python's automatic garbage collection mechanism is a basic characteristic of high-level programming languages, programming languages have used this feature, programmers usually do not have to care about the problem of memory leaks, and when we write programs using C / C ++, this is one of the most important need to seriously consider the issue but very error-prone. Data structure is an important part of the program configuration, linked lists, trees, these issues need to be carefully expressed in the C programming FIG lot simpler in Python. In Python, the basic data structure is the array, sequence, and hash tables, they want to express with a variety of common data structures is very easy. Did not define pointers, memory allocation of tasks, programming becomes interesting. CORBA is an advanced software architecture, it is language-independent platform independent. C ++, Java and other languages have CORBA bindings, but compared with them, but the Python bindings CORBA lot easier, because the programmer view, a CORBA classes and Python classes and use them to implement and there is no difference . Not troubled complex architecture, written in Python CORBA program also becomes easy. Good steel should be used wisely, with the limited time in order to complete the task as much as possible, make all kinds of problems unrelated to abandon it, and Python provides exactly this approach. Cross-platform and easy expansion as Linux continues to mature, more and more people go to work on the Linux platform, software developers naturally want to write your own software that can run on all platforms. Java's write once, run everywhere slogan makes it a cross platform development toolModel, but its speed is not optimistic about the people. In fact, almost all the famous are cross-platform scripting language, Python is no exception. Python not only supports various Linux / Unix systems, also supports Windows, even Python programs can be run on the Palm. A program you want to work across platforms, requires more than language itself can be done between platforms, and in the era of the graphical interface, but also the need for cross-platform work Widget. Python only supports some of the old TK, also supports the new GTK +, QT and wxWidget, and these Widgets can work on multiple platforms. Through them, the programmer can write a beautiful cross-platform GUI program. Python usually runs between native code and script code, programmers can use C / C ++ to Python written in a variety of modules, which not only allows programmers to use the system in a variety of ways of service and Python in C / excellent written in C ++ libraries and libraries, can also significantly increase the speed of Python programs. Modules written in Python with C / C ++ is not complicated, and in order to simplify this work, it also produced a number of tools to assist in this work. That is why, now commonly used in various libraries and libraries have Python language bindings, in Python can do things more and more. Skeleton Key? Python is powerful, but it is not a panacea. If you want to write an operating system or drivers, it is clear, Python is not. Write software, which tool is not a panacea, the reason why there are so many programming languages, because of different languages ​​for different things to do. Therefore, choose their own language is the most important tool.

Excerpt: http://sf.org.cn/Article/base/200612/19836.html

Reproduced in: https: //my.oschina.net/garyun/blog/602837

Guess you like

Origin blog.csdn.net/weixin_34143774/article/details/91774459