Sunteți pe pagina 1din 4

Python (programming language)

From Wikipedia, the free encyclopedia

Python

Paradigm Object-oriented, imperative, functional, procedural, reflective

Designed by Guido van Rossum

Developer Python Software Foundation

First appeared 1990[1]

Stable release 3.6.5 / 28 March 2018; 31 days ago[2]

2.7.14 / 16 September 2017; 7 months ago[3]

Preview release 3.7.0b3[4] / 29 March 2018; 30 days ago

Typing discipline Duck, dynamic, strong

License Python Software Foundation License

Filename extensions .py, .pyc, .pyd, .pyo (prior to 3.5),[5] .pyw, .pyz (since 3.5)[6]

Website python.org

Major implementations

CPython, IronPython, Jython, MicroPython, Numba, PyPy, Stackless Python


Dialects

Cython, RPython

Influenced by

ABC,[7] ALGOL 68,[8] C,[9] C++,[10] CLU,[11]Dylan,[12] Haskell,[13] Icon,[14] Java,[15] Lisp,[16]Modula-3,[10] Perl

Influenced

Boo, Cobra, Coconut,[17] CoffeeScript,[18] D, F#, Falcon, Genie,[19] Go, Groovy, JavaScript,[20][21] Julia,[22] Nim, Ring,[23]Ruby,[24] S
wift[25]

 Python Programming at Wikibooks

Python is an interpreted high-level programming language for general-purpose programming.


Created by Guido van Rossum and first released in 1991, Python has a design philosophy that
emphasizes code readability, notably using significant whitespace. It provides constructs that enable
clear programming on both small and large scales.[26]
Python features a dynamic type system and automatic memory management. It supports
multiple programming paradigms, including object-oriented, imperative, functional and procedural,
and has a large and comprehensive standard library.[27]
Python interpreters are available for many operating systems. CPython, the reference
implementation of Python, is open sourcesoftware[28] and has a community-based development
model, as do nearly all of its variant implementations. CPython is managed by the non-profit Python
Software Foundation.

Contents
[hide]

 1History
 2Features and philosophy
 3Syntax and semantics
o 3.1Indentation
o 3.2Statements and control flow
o 3.3Expressions
o 3.4Methods
o 3.5Typing
o 3.6Mathematics
 4Libraries
 5Development environments
 6Implementations
o 6.1Reference implementation
o 6.2Other implementations
o 6.3Unsupported implementations
o 6.4Cross-compilers to other languages
o 6.5Performance
 7Development
 8Naming
 9Uses
 10Languages influenced by Python
 11See also
 12References
 13Further reading
 14External links

History[edit]

Guido van Rossum, the creator of Python

Main article: History of Python


Python was conceived in the late 1980s,[29] and its implementation began in December
1989[30] by Guido van Rossum at Centrum Wiskunde & Informatica (CWI) in the Netherlands as a
successor to the ABC language (itself inspired by SETL)[31] capable of exception handling and
interfacing with the Amoeba operating system.[7] Van Rossum remains Python's principal author. His
continuing central role in Python's development is reflected in the title given to him by the Python
community: Benevolent Dictator For Life (BDFL).
On the origins of Python, Van Rossum wrote in 1996:[32]
...In December 1989, I was looking for a "hobby" programming project that would keep me occupied
during the week around Christmas. My office ... would be closed, but I had a home computer, and
not much else on my hands. I decided to write an interpreter for the new scripting language I had
been thinking about lately: a descendant of ABC that would appeal to Unix/Chackers. I chose Python
as a working title for the project, being in a slightly irreverent mood (and a big fan of Monty Python's
Flying Circus).

— Guido van Rossum


Python 2.0 was released on 16 October 2000 and had many major new features, including a cycle-
detecting garbage collector and support for Unicode. With this release, the development process
became more transparent and community-backed.[33]
Python 3.0 (initially called Python 3000 or py3k) was released on 3 December 2008 after a long
testing period. It is a major revision of the language that is not completely backward-compatible with
previous versions.[34] However, many of its major features have been backportedto the Python
2.6.x[35] and 2.7.x version series, and releases of Python 3 include the 2to3 utility, which automates
the translation of Python 2 code to Python 3.[36]
Python 2.7's end-of-life date was initially set at 2015, then postponed to 2020 out of concern that a
large body of existing code could not easily be forward-ported to Python 3.[37][38]
Python 3.6 had changes regarding UTF-8 (in Windows, PEP 528 and PEP 529) and Python 3.7.0b1
(PEP 540) adds a new "UTF-8 Mode" (and overrides POSIX locale).
In January 2017, Google announced work on a Python 2.7 to Go transcompiler to improve
performance under concurrent workloads.[39]

Features and philosophy[edit]


Python is a multi-paradigm programming language. Object-oriented programming and structured
programming are fully supported, and many of its features support functional
programming and aspect-oriented programming (including
by metaprogramming[40] and metaobjects (magic methods)).[41] Many other paradigms are supported
via extensions, including design by contract[42][43] and logic programming.[44]
Python uses dynamic typing, and a combination of reference counting and a cycle-detecting garbage
collector for memory management. It also features dynamic name resolution(late binding), which
binds method and variable names during program execution.
Python's design offers some support for functional programming in the Lisp tradition. It
has filter() , map() , and reduce() functions; list comprehensions, dictionaries, and sets;
and generator expressions.[45] The standard library has two modules (itertools and functools) that
implement functional tools borrowed from Haskell and Standard ML.[46]
The language's core philosophy is summarized in the document The Zen of Python (PEP 20), which
includes aphorisms such as:[47]

 Beautiful is better than ugly


 Explicit is better than implicit
 Simple is better than complex
 Complex is better than complicated
 Readability counts
Rather than having all of its functionality built i

S-ar putea să vă placă și