Powerful Python language Introduction

Source: Internet
Author: User

Don't think that Python is a very academic language. Although many people think it is very suitable as an entry-level language for learning programming, I am also worried for a long time. Later I finally found a solution, I hope you can learn the relevant content.

In Guido's opinion, ABC is a very elegant and powerful language designed specifically for non-professional programmers. However, the ABC language is not successful. The reason is that Guido believes that it is not open. Guido is determined to avoid this error in Python. It is true that Python is well integrated with other languages such as C, C ++ and Java ). At the same time, he also wants to implement things that flash in ABC but have never been implemented.

In this way, Python was born in Guido. In fact, the first implementation is on a Mac machine. It can be said that Python was developed from ABC and was mainly influenced by another very beautiful and powerful language of Modula-3, designed for small groups. It also integrates the Unix shell and C habits. Although Python may be roughly classified as "script language scripting language)", it is widely used in some large-scale software development plans, such as Zope, Mnet, and BitTorrent. Google.

Python fans prefer to call it a high-order dynamic programming language because "scripting language" generally refers to a single use of simple programming tasks such as shell scripts, python cannot be compared with programming languages such as JavaScript that can only process simple tasks.

Scalability is a feature of Python as a programming language. New built-in module) can be written in C or C ++. We can also add Python interfaces to existing modules. Python allows you to focus on the program tasks to be implemented by avoiding excessive syntax constraints.

Python is also known as a clear language. The general guiding ideology of its authors when designing it is that there is only one best solution to a specific problem. This is expressed in The python motto "The Zen of Python" written by Tim Peters:

 
 
  1. if age<21: 
  2.  
  3.     print "You cannot buy wine!\n"  
  4.  
  5.     print "But you can buy chewing gum.\n"  
  6.  
  7. print "this is outside if\n" 

The difference between a module and most other languages, such as C) is the boundary of a module, it is determined by the position of the first character of each line in this line, while the C language uses a pair of curly braces {} to clearly define the boundary of the module, is irrelevant to the character position ).

This has caused controversy. Since the birth of a language like C, the Syntactic meaning of the language is separated from the character arrangement, and it has been regarded as a progress of a programming language. But it is undeniable that Python makes the program clearer and more beautiful by forcing programmers to indent all the places where they need to use modules, such as if, for, and function definition.

The clear and readable Syntax of Python makes the software code exceptionally easy to understand, and even the strong feeling for programmers who are not initially engaged in and developing the original project. Although some programmers oppose the extensive use of spaces in Python code, almost everyone acknowledges that the readability of Python code is far better than that of C or Java, the latter two adopt special character mark code block structures, loops, functions, and other programming structures to start and end. Those who advocate Python also claim that using these characters may produce significant differences in programming style, making it difficult for those who are responsible for maintaining the code to read the code.
Python's clear syntax makes it a learning curve and programming language. Experienced programmers may even master the basic knowledge of Python within one day, but they will be able to get started after at most one week, programming Language experts will certainly be much faster than their knowledge of C, C ++, Java, and even Perl.

  1. How to embed Python into C ++ applications?
  2. In-depth discussion of Ruby and Python syntax comparison
  3. Introduction to Python
  4. Python Learning Experience: version, IDE selection and coding Solutions
  5. Analysis of Python GIL and thread security

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.