First, Python introduction

Source: Internet
Author: User

1. Founder: Guido van Rossum

2, the main application of the field:

Cloud computing, Web development, scientific computers, artificial intelligence, system operations, finance, graphical GUI

3, Python is a dynamic interpretation of the strong-type definition language .

3.1. Programming language classification

3.1.1 Compiled and interpreted type

Compiled: The program is compiled before running, generate executable files, compiled after the completion of the execution of the program is the machine code (a one-time conversion of the code into machine code language).

Fast execution speed, low system requirements under the same conditions, the development of operating systems, large applications, database systems using compiled language.

For example: C, C + +, Pascalobject, Pascal (Delphi), VB, etc.

Interpreted: The program runs the first moment only the source program, each time the program executes to an instruction, the source code will be converted to binary code for execution.

Web scripts, server Scripts and auxiliary development interface, the speed requirements are not high, the compatibility of different system platforms have certain requirements of the program.

For example: Java (both compiler-style features), JavaScript, VBScript, Perl, Python, etc.

3.1.2 Dynamic type language and static type language

Dynamic type language: Data type detection during run time, without assigning a data type to any variable, the data type will be recorded internally when assigning to a variable for the first time.

For example: Python, Ruby, etc.

Static type language: Data type checking during compilation, and the data type of all variables to be declared when the program is written.

Example: C, C + +, C #, Java, etc.

3.1.3 Strong type definition language and weak type definition language

Strongly typed definition language: A variable is assigned a data type and is always this type if it is not cast.

A strongly typed definition language is a type-safe language.

Weak type definition language: Data types can be ignored, and a variable can be assigned different types of values.

The strongly typed definition language is slightly slower than the weak type definition language.

3.1.4 Note

Language type safety and language is not a dynamic language is not linked

For example: Python dynamic type language strong type definition language type safe language

VBScript Dynamic type language weak type definition language type unsafe language

Java Static type language strong type definition language type safe language

4. The advantages and disadvantages of Python language

4.1 Advantages

(1) Python positioning "elegant, clear, simple" easy to get started, go deep can write very complex programs.

(2) The development efficiency is high, has the powerful third-party library, may download the call directly.

(3) High-level languages do not need to consider how to manage the underlying details of a program's use of memory when writing programs.

(4) can be ported to many system platforms to run.

(5) extensibility, if you need a piece of critical code to run faster, or some algorithms are not public, some programs can be written in C + +.

(6) embeddable type, you can embed Python in C + + program, to provide programming users with scripting capabilities.

4.2 Disadvantages

(1) Slow (user not aware)

(2) Code is not encrypted, the form of the name.

(3) Threads cannot take advantage of multiple CPUs, and only one thread executes at any time.

5. Python Interpreter

(1) CPython

Most widely used, developed with C language

(2) IPython

Interactive interpreter, enhanced only in interactive mode

(3) PyPy

Enhanced execution speed and JIT technology for dynamic compilation of Python code

(4) Jpython

Compile the Python code directly into Java bytecode form.

(5) IronPython

Compile the Python code directly into a. NET bytecode form.

Summary: The most widely used is CPython, if you want to interact with the Java or. NET platform, the best approach is not to use Jpython or IronPython, but rather to interact via network tuning to ensure the program's direct independence.

First, Python introduction

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.