This article is missing information about prominent features of versions after 3.0.(March 2024) |
The programming language Python was conceived in the late 1980s, [1] and its implementation was started in December 1989 [2] by Guido van Rossum at CWI in the Netherlands as a successor to ABC capable of exception handling and interfacing with the Amoeba operating system. [3] Van Rossum is Python's principal author, and his continuing central role in deciding the direction of Python is reflected in the title given to him by the Python community, Benevolent Dictator for Life (BDFL). [4] [5] (However, Van Rossum stepped down as leader on July 12, 2018. [6] ). Python was named after the BBC TV show Monty Python's Flying Circus . [7]
Python 2.0 was released on October 16, 2000, with many major new features, such as list comprehensions, cycle-detecting garbage collector (in addition to reference counting) and reference counting, for memory management and support for Unicode, along with a change to the development process itself, with a shift to a more transparent and community-backed process. [8]
Python 3.0, a major, backwards-incompatible release, was released on December 3, 2008 [9] after a long period of testing. Many of its major features have also been backported to the backwards-compatible, though now-unsupported, Python 2.6 and 2.7. [10] Releases of Python 3 include the 2to3
utility, which automates the translation of Python 2 code to Python 3. [11]
In February 1991, Van Rossum published the code (labeled version 0.9.0) to alt.sources. [12] [13] Already present at this stage in development were classes with inheritance, exception handling, functions, and the core datatypes of list
, dict
, str
and so on. Also in this initial release was a module system borrowed from Modula-3; Van Rossum describes the module as "one of Python's major programming units". [1] Python's exception model also resembles Modula-3's, with the addition of an else
clause. [3] In 1994 comp.lang.python, the primary discussion forum for Python, was formed, marking a milestone in the growth of Python's userbase and popularity. [1]
Python reached version 1.0 in January 1994. The major new features included in this release were the functional programming tools lambda
, map
, filter
and reduce
. Van Rossum stated that "Python acquired lambda, reduce(), filter() and map(), courtesy of a Lisp hacker who missed them and submitted working patches". [14]
The last version released while Van Rossum was at CWI was Python 1.2. In 1995, Van Rossum continued his work on Python at the Corporation for National Research Initiatives (CNRI) in Reston, Virginia from where he released several versions.
By version 1.4, Python had acquired several new features. Notable among these are the Modula-3 inspired keyword arguments (which are also similar to Common Lisp's keyword arguments) and built-in support for complex numbers. Also included is a basic form of data hiding by name mangling, though this is easily bypassed. [15]
During Van Rossum's stay at CNRI, he launched the Computer Programming for Everybody (CP4E) initiative, intending to make programming more accessible to more people, with a basic "literacy" in programming languages, similar to the basic English literacy and mathematics skills required by most employers. Python served a central role in this: because of its focus on clean syntax, it was already suitable, and CP4E's goals bore similarities to its predecessor, ABC. The project was funded by DARPA. [16] As of 2007 [update] , the CP4E project is inactive, and while Python attempts to be easily learnable and not too arcane in its syntax and semantics, outreach to non-programmers is not an active concern. [17]
In 2000, the Python core development team moved to BeOpen.com [18] to form the BeOpen PythonLabs team. [19] [20] CNRI requested that a version 1.6 be released, summarizing Python's development up to the point at which the development team left CNRI. Consequently, the release schedules for 1.6 and 2.0 had a significant amount of overlap. [8] Python 2.0 was the only release from BeOpen.com. After Python 2.0 was released by BeOpen.com, Guido van Rossum and the other PythonLabs developers joined Digital Creations.
The Python 1.6 release included a new CNRI license that was substantially longer than the CWI license that had been used for earlier releases. The new license included a clause stating that the license was governed by the laws of the State of Virginia. The Free Software Foundation argued that the choice-of-law clause was incompatible with the GNU General Public License. BeOpen, CNRI and the FSF negotiated a change to Python's free-software license that would make it GPL-compatible. Python 1.6.1 is essentially the same as Python 1.6, with a few minor bug fixes, and with the new GPL-compatible license. [21]
Python 2.0, released October 2000, [8] introduced list comprehensions, a feature borrowed from the functional programming languages SETL and Haskell. Python's syntax for this construct is very similar to Haskell's, apart from Haskell's preference for punctuation characters and Python's preference for alphabetic keywords. Python 2.0 also introduced a garbage collector able to collect reference cycles. [8]
Python 2.1 was close to Python 1.6.1, as well as Python 2.0. Its license was renamed Python Software Foundation License. All code, documentation and specifications added, from the time of Python 2.1's alpha release on, is owned by the Python Software Foundation (PSF), a nonprofit organization formed in 2001, modeled after the Apache Software Foundation. [21] The release included a change to the language specification to support nested scopes, like other statically scoped languages. [22] (The feature was turned off by default, and not required, until Python 2.2.)
Python 2.2 was released in December 2001; [23] a major innovation was the unification of Python's types (types written in C) and classes (types written in Python) into one hierarchy. This single unification made Python's object model purely and consistently object oriented. [24] Also added were generators which were inspired by Icon. [25]
Python 2.5 was released in September 2006 [26] and introduced the with
statement, which encloses a code block within a context manager (for example, acquiring a lock before the block of code is run and releasing the lock afterwards, or opening a file and then closing it), allowing resource acquisition is initialization (RAII)-like behavior and replacing a common try/finally idiom. [27]
Python 2.6 was released to coincide with Python 3.0, and included some features from that release, as well as a "warnings" mode that highlighted the use of features that were removed in Python 3.0. [28] [10] Similarly, Python 2.7 coincided with and included features from Python 3.1, [29] which was released on June 26, 2009. Parallel 2.x and 3.x releases then ceased, and Python 2.7 was the last release in the 2.x series. [30] In November 2014, it was announced that Python 2.7 would be supported until 2020, but users were encouraged to move to Python 3 as soon as possible. [31] Python 2.7 support ended on January 1, 2020, along with code freeze of 2.7 development branch. A final release, 2.7.18, occurred on April 20, 2020, and included fixes for critical bugs and release blockers. [32] This marked the end-of-life of Python 2. [33]
Python 3.0 (also called "Python 3000" or "Py3K") was released on December 3, 2008. [9] It was designed to rectify fundamental design flaws in the language –the changes required could not be implemented while retaining full backwards compatibility with the 2.x series, which necessitated a new major version number. The guiding principle of Python 3 was: "reduce feature duplication by removing old ways of doing things". [34]
Python 3.0 was developed with the same philosophy as in prior versions. However, as Python had accumulated new and redundant ways to program the same task, Python 3.0 had an emphasis on removing duplicative constructs and modules, in keeping with the Zen of Python: "There should be one— and preferably only one —obvious way to do it".
Nonetheless, Python 3.0 remained a multi-paradigm language. Coders could still follow object-oriented, structured, and functional programming paradigms, among others, but within such broad choices, the details were intended to be more obvious in Python 3.0 than they were in Python 2.x.
Python 3.0 broke backward compatibility, and much Python 2 code does not run unmodified on Python 3. [35] Python's dynamic typing combined with the plans to change the semantics of certain methods of dictionaries, for example, made perfect mechanical translation from Python 2.x to Python 3.0 very difficult. A tool called "2to3
" does the parts of translation that can be done automatically. At this, 2to3
appeared to be fairly successful, though an early review noted that there were aspects of translation that such a tool would never be able to handle. [36] Prior to the roll-out of Python 3, projects requiring compatibility with both the 2.x and 3.x series were recommended to have one source (for the 2.x series), and produce releases for the Python 3.x platform using 2to3
. Edits to the Python 3.x code were discouraged for so long as the code needed to run on Python 2.x. [10] This is no longer recommended; as of 2012 the preferred approach was to create a single code base that can run under both Python 2 and 3 using compatibility modules. [37]
Some of the major changes included for Python 3.0 were:
print
so that it is a built-in function, not a statement. This made it easier to change a module to use a different print function, as well as making the syntax more regular. In Python 2.6 and 2.7 print()
is available as a built-in but is masked by the print statement syntax, which can be disabled by entering from __future__ import print_function
at the top of the file [38] input
function, and the renaming of the raw_input
function to input
. Python 3's input
function behaves like Python 2's raw_input
function, in that the input is always returned as a string rather than being evaluated as an expressionreduce
(but not map
or filter
) out of the built-in namespace and into functools
(the rationale being code that uses reduce
is less readable than code that uses a for loop and accumulator variable) [39] [40] str
/unicode
types, representing text, and introducing a separate immutable bytes
type; and a mostly corresponding mutable bytearray
type, both of which represent arrays of bytes [42] 5 / 2
is 2
; whereas in Python 3, 5 / 2
is 2.5
. (In both Python 2 –2.2 onwards –and Python 3, a separate operator exists to provide the old behavior: 5 // 2
is 2
)smörgåsbord
Subsequent releases in the Python 3.x series have included additional, substantial new features; all ongoing development of the language is done in the 3.x series.
Releases before numbered versions:
Version | Latest micro version | Release date | End of full support | End of security fixes |
---|---|---|---|---|
0.9 | 0.9.9 [2] | 1991-02-20 [2] | 1993-07-29 [a] [2] | |
1.0 | 1.0.4 [2] | 1994-01-26 [2] | 1994-07-14 [a] [2] | |
1.1 | 1.1.1 [2] | 1994-10-11 [2] | 1994-11-10 [a] [2] | |
1.2 | 1995-04-13 [2] | Unsupported | ||
1.3 | 1995-10-13 [2] | Unsupported | ||
1.4 | 1996-10-25 [2] | Unsupported | ||
1.5 | 1.5.2 [44] | 1998-01-03 [2] | 1999-04-13 [a] [2] | |
1.6 | 1.6.1 [44] | 2000-09-05 [45] | 2000–09 [a] [44] | |
2.0 | 2.0.1 [46] | 2000-10-16 [47] | 2001-06-22 [a] [46] | |
2.1 | 2.1.3 [46] | 2001-04-15 [48] | 2002-04-09 [a] [46] | |
2.2 | 2.2.3 [46] | 2001-12-21 [49] | 2003-05-30 [a] [46] | |
2.3 | 2.3.7 [46] | 2003-06-29 [50] | 2008-03-11 [a] [46] | |
2.4 | 2.4.6 [46] | 2004-11-30 [51] | 2008-12-19 [a] [46] | |
2.5 | 2.5.6 [46] | 2006-09-19 [52] | 2011-05-26 [a] [46] | |
2.6 | 2.6.9 [28] | 2008-10-01 [28] | 2010-08-24 [b] [28] | 2013-10-29 [28] |
2.7 | 2.7.18 [33] | 2010-07-03 [33] | 2020-01-01 [c] [33] | |
3.0 | 3.0.1 [46] | 2008-12-03 [28] | 2009-06-27 [53] | |
3.1 | 3.1.5 [54] | 2009-06-27 [54] | 2011-06-12 [55] | 2012-04-06 [54] |
3.2 | 3.2.6 [56] | 2011-02-20 [56] | 2013-05-13 [b] [56] | 2016-02-20 [56] |
3.3 | 3.3.7 [57] | 2012-09-29 [57] | 2014-03-08 [b] [57] | 2017-09-29 [57] |
3.4 | 3.4.10 [58] | 2014-03-16 [58] | 2017-08-09 [59] | 2019-03-18 [a] [58] |
3.5 | 3.5.10 [60] | 2015-09-13 [60] | 2017-08-08 [61] | 2020-09-30 [60] |
3.6 | 3.6.15 [62] | 2016-12-23 [62] | 2018-12-24 [b] [62] | 2021-12-23 [62] |
3.7 | 3.7.17 [63] | 2018-06-27 [63] | 2020-06-27 [b] [63] | 2023-06-06 [63] |
3.8 | 3.8.20 [64] | 2019-10-14 [64] | 2021-05-03 [b] [64] | 2024-10-07 [64] |
3.9 | 3.9.21 [65] | 2020-10-05 [65] | 2022-05-17 [b] [65] | 2025-10 [65] [66] |
3.10 | 3.10.16 [67] | 2021-10-04 [67] | 2023-04-05 [b] [67] | 2026-10 [67] |
3.11 | 3.11.11 [68] | 2022-10-24 [68] | 2024-04-02 [b] [68] | 2027-10 [68] |
3.12 | 3.12.8 [69] | 2023-10-02 [69] | 2025-05 [69] | 2028-10 [69] |
3.13 | 3.13.1 [70] | 2024-10-07 [70] | 2026-05 [70] | 2029-10 [70] |
3.14 | 3.14.0a3 [71] | 2025-10-01 [71] | 2027-05 [71] | 2030-10 [71] |
Table notes:
Python is a high-level, general-purpose programming language. Its design philosophy emphasizes code readability with the use of significant indentation.
ABC is an imperative general-purpose programming language and integrated development environment (IDE) developed at Centrum Wiskunde & Informatica (CWI), in Amsterdam, Netherlands by Leo Geurts, Lambert Meertens, and Steven Pemberton. It is interactive, structured, high-level, and intended to be used instead of BASIC, Pascal, or AWK. It is intended for teaching or prototyping, but not as a systems-programming language.
Guido van Rossum is a Dutch programmer. He is the creator of the Python programming language, for which he was the "benevolent dictator for life" (BDFL) until he stepped down from the position on 12 July 2018. He remained a member of the Python Steering Council through 2019, and withdrew from nominations for the 2020 election.
NumPy is a library for the Python programming language, adding support for large, multi-dimensional arrays and matrices, along with a large collection of high-level mathematical functions to operate on these arrays. The predecessor of NumPy, Numeric, was originally created by Jim Hugunin with contributions from several other developers. In 2005, Travis Oliphant created NumPy by incorporating features of the competing Numarray into Numeric, with extensive modifications. NumPy is open-source software and has many contributors. NumPy is fiscally sponsored by NumFOCUS.
mod_python is an Apache HTTP Server module that integrates the Python programming language with the server. It is intended to provide a Python language binding for the Apache HTTP Server.
Grail was a free extensible multi-platform web browser written in the Python programming language. The project was started in August 1995, with its first public release in November of that year. The last official release was version 0.6 in 1999.
CPython is the reference implementation of the Python programming language. Written in C and Python, CPython is the default and most widely used implementation of the Python language.
Sound eXchange (SoX) is a cross-platform audio editing software. It has a command-line interface, and is written in standard C. It is free software, licensed under GPL-2.0-or-later, with libsox licensed under LGPL-2.1-or-later, and distributed by Chris Bagwell through SourceForge.
The Corporation for National Research Initiatives (CNRI), based in Reston, Virginia, is a non-profit organization founded in 1986 by Robert E. Kahn as an "activities center around strategic development of network-based information technologies", including the National Information Infrastructure (NII) in the United States.
The Python Software Foundation License (PSFL) is a BSD-style, permissive software license which is compatible with the GNU General Public License (GPL). Its primary use is for distribution of the Python project software and its documentation. Since the license is permissive, it allows proprietization of the derivations. The PSFL is listed as approved on both FSF's approved licenses list, and OSI's approved licenses list.
The Python License is a deprecated permissive computer software license created by the Corporation for National Research Initiatives (CNRI). It was used for versions 1.6 and 2.0 of the Python programming language, both released in the year 2000.
The syntax of the Python programming language is the set of rules that defines how a Python program will be written and interpreted. The Python language has many similarities to Perl, C, and Java. However, there are some definite differences between the languages. It supports multiple programming paradigms, including structured, object-oriented programming, and functional programming, and boasts a dynamic type system and automatic memory management.
IDLE is an integrated development environment for Python, which has been bundled with the default implementation of the language since 1.5.2b1. It is packaged as an optional part of the Python packaging with many Linux distributions. It is completely written in Python and the Tkinter GUI toolkit.
Benevolent dictator for life (BDFL) is a title given to a small number of open-source software development leaders, typically project founders who retain the final say in disputes or arguments within the community. The phrase originated in 1995 with reference to Guido van Rossum, creator of the Python programming language.
Cython is a superset of the programming language Python, which allows developers to write Python code that yields performance comparable to that of C.
Gerrit is a free, web-based team code collaboration tool. Software developers in a team can review each other's modifications on their source code using a Web browser and approve or reject those changes. It integrates closely with Git, a distributed version control system.
In the software development process, a reference implementation is a program that implements all requirements from a corresponding specification. The reference implementation often accompanies a technical standard, and demonstrates what should be considered the "correct" behavior of any other implementation of it.
The Python Conference is the largest annual convention for the discussion and promotion of the Python programming language. It originated in the United States but is also held in more than 40 other countries. It was one of the first computer programming conferences to develop and adhere to a code of conduct. The conference hosts tutorials, demonstrations and training sessions.
Tim Peters is a software developer who is known for creating the Timsort hybrid sorting algorithm and for his major contributions to the Python programming language and its original CPython implementation. A pre-1.0 CPython user, he was among the group of early adopters who contributed to the detailed design of the language in its early stages.
The Unified Font Object (UFO) is an XML-based source file format for digital fonts. It was created by Tal Leming, Just van Rossum and Erik van Blokland. Contributors to the format also include Ben Kiel and Frederik Berlaen. According to its creators, the UFO is a "future proof" open format that is designed to be "application independent", "human readable and human editable".
Much as Python 2.6 incorporated features from Python 3.0, version 2.7 incorporates some of the new features in Python 3.1. The 2.x series continues to provide tools for migrating to the 3.x series.