Английская Википедия:History of Python

Материал из Онлайн справочника
Перейти к навигацииПерейти к поиску

Шаблон:Short description Шаблон:Use mdy dates Шаблон:Missing information

Файл:Python logo 1990s.svg
Old Python logo, 1990s–2006
Файл:Python logo and wordmark.svg
New Python logo, 2006–present
Файл:Guido-portrait-2014.jpg
Guido van Rossum in 2014

Шаблон:Main

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, including a cycle-detecting garbage collector (in addition to 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]

Early history

In February 1991, Van Rossum published the code (labeled version 0.9.0) to alt.sources.[11][12] Already present at this stage in development were classes with inheritance, exception handling, functions, and the core datatypes of Шаблон:Code, Шаблон:Code, Шаблон:Code 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 Шаблон:Code 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.[1]

Version 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".[13]

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.[14]

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.[15] Шаблон:As of, 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.[16]

BeOpen

In 2000, the Python core development team moved to BeOpen.com[17] to form the BeOpen PythonLabs team, under the direction of early Google alum Domenic Merenda.[18][19] 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.[20]

Version 2

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 capable of collecting 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 non-profit organization formed in 2001, modeled after the Apache Software Foundation.[20] The release included a change to the language specification to support nested scopes, like other statically scoped languages.[21] (The feature was turned off by default, and not required, until Python 2.2.)

Python 2.2 was released in December 2001;[22] 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.[23] Also added were generators which were inspired by Icon.[24]

Шаблон:Multiple images Python 2.5 was released in September 2006 [25] and introduced the Шаблон:Code 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.[26]

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.[27][10] Similarly, Python 2.7 coincided with and included features from Python 3.1,[28] 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.[29] 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.[30] 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.[31] This marked the end-of-life of Python 2.[32]

Version 3

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Шаблон:Sndthe 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".[33]

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.

Compatibility

Python 3.0 broke backward compatibility, and much Python 2 code does not run unmodified on Python 3.[34] 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.[35] 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.[36]

Features

Some of the major changes included for Python 3.0 were:

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.

Table of versions

Releases before numbered versions:

Version Latest micro version Release date End of full support End of security fixes
Шаблон:Version 0.9.9[2] 1991-02-20[2] 1993-07-29Шаблон:Efn[2]
Шаблон:Version 1.0.4[2] 1994-01-26[2] 1994-02-15Шаблон:Efn[2]
Шаблон:Version 1.1.1[2] 1994-10-11[2] 1994-11-10Шаблон:Efn[2]
Шаблон:Version 1995-04-13[2] Unsupported
Шаблон:Version 1995-10-13[2] Unsupported
Шаблон:Version 1996-10-25[2] Unsupported
Шаблон:Version 1.5.2[42] 1998-01-03[2] 1999-04-13Шаблон:Efn[2]
Шаблон:Version 1.6.1[42] 2000-09-05[43] 2000-09Шаблон:Efn[42]
Шаблон:Version 2.0.1[44] 2000-10-16[45] 2001-06-22Шаблон:Efn[44]
Шаблон:Version 2.1.3[44] 2001-04-15[46] 2002-04-09Шаблон:Efn[44]
Шаблон:Version 2.2.3[44] 2001-12-21[47] 2003-05-30Шаблон:Efn[44]
Шаблон:Version 2.3.7[44] 2003-06-29[48] 2008-03-11Шаблон:Efn[44]
Шаблон:Version 2.4.6[44] 2004-11-30[49] 2008-12-19Шаблон:Efn[44]
Шаблон:Version 2.5.6[44] 2006-09-19[50] 2011-05-26Шаблон:Efn[44]
Шаблон:Version 2.6.9[27] 2008-10-01[27] 2010-08-24Шаблон:Efn[27] 2013-10-29[27]
Шаблон:Version 2.7.18[32] 2010-07-03[32] 2020-01-01Шаблон:Efn[32]
Шаблон:Version 3.0.1[44] 2008-12-03[27] 2009-06-27[51]
Шаблон:Version 3.1.5[52] 2009-06-27[52] 2011-06-12[53] 2012-04-06[52]
Шаблон:Version 3.2.6[54] 2011-02-20[54] 2013-05-13Шаблон:Efn[54] 2016-02-20[54]
Шаблон:Version 3.3.7[55] 2012-09-29[55] 2014-03-08Шаблон:Efn[55] 2017-09-29[55]
Шаблон:Version 3.4.10[56] 2014-03-16[56] 2017-08-09[57] 2019-03-18Шаблон:Efn[56]
Шаблон:Version 3.5.10[58] 2015-09-13[58] 2017-08-08[59] 2020-09-30[58]
Шаблон:Version 3.6.15[60] 2016-12-23[60] 2018-12-24Шаблон:Efn[60] 2021-12-23[60]
Шаблон:Version 3.7.17[61] 2018-06-27[61] 2020-06-27Шаблон:Efn[61] 2023-06-06[61]
Шаблон:VersionШаблон:Update after 3.8.18[62] 2019-10-14[62] 2021-05-03Шаблон:Efn[62] 2024-10[62]Шаблон:Update after
Шаблон:VersionШаблон:Update after 3.9.18[63] 2020-10-05[63] 2022-05-17Шаблон:Efn[63] 2025-10[63][64]Шаблон:Update after
Шаблон:VersionШаблон:Update after 3.10.13[65] 2021-10-04[65] 2023-04-05Шаблон:Efn[65] 2026-10[65]Шаблон:Update after
Шаблон:VersionШаблон:Update after 3.11.8[66]Шаблон:Update after 2022-10-24[66] 2024-04-01[66]Шаблон:Update after 2027-10[66]Шаблон:Update after
Шаблон:Version 3.12.2[67]Шаблон:Update after 2023-10-02[67] 2025-05[67]Шаблон:Update after 2028-10[67]Шаблон:Update after
Шаблон:VersionШаблон:Update after 3.13.0a5[68]Шаблон:Update after 2024-10-01[68]Шаблон:Update after 2026-05[68]Шаблон:Update after 2029-10[68]Шаблон:Update after
Legend: Шаблон:Version
Italics indicates the latest micro version of currently supported versions as of 2024-03-13Шаблон:Update after.

Table notes: Шаблон:Notelist

Support

<timeline> ImageSize = width:1000 height:auto barincrement:20 PlotArea = left:40 right:20 bottom:30 top:10

DateFormat = dd/mm/yyyy Period = from:01/01/1990 till:01/01/2030 TimeAxis = orientation:horizontal

Colors =

 id:in_development  value:rgb(0.76, 0.90, 0.96)  legend:In_development
 id:pre_release     value:rgb(1, 0.82, 0.63)  legend:Pre_release
 id:in_support      value:rgb(0.83, 0.96, 0.71)  legend:In_support
 id:maintenance     value:rgb(1, 0.97, 0.78)  legend:Maintenance
 id:out_of_support  value:rgb(0.99, 0.70, 0.67)  legend:Out_of_support
 id:colgrmaj   value:gray(0.5)
 id:colgrmin   value:gray(0.8)

ScaleMajor = gridcolor:colgrmaj unit:year increment:5 start:01/01/1990 ScaleMinor = gridcolor:colgrmin unit:year increment:1 start:01/01/1990

Define $now = 05/04/2024 LineData=

 at:$now color:red width:0.2

PlotData=

 mark:(line,black)
 width:16
 fontsize:S
 shift:(-6, -4)
 bar:3.13 from:01/10/2024 till:01/10/2029 text:3.13 color:in_development
 bar:3.12 from:02/10/2023 till:01/10/2028 text:3.12 color:in_support
 bar:3.11 from:24/10/2022 till:01/10/2027 text:3.11 color:maintenance
 bar:3.10 from:04/10/2021 till:01/10/2026 text:3.10 color:maintenance
 bar:3.9 from:05/10/2020 till:01/10/2025 text:3.9 color:maintenance 
 bar:3.8 from:14/10/2019 till:01/10/2024 text:3.8 color:maintenance
 bar:3.7 from:27/06/2018 till:06/06/2023 text:3.7 color:out_of_support
 bar:3.6 from:23/12/2016 till:23/12/2021 text:3.6 color:out_of_support
 bar:3.5 from:13/09/2015 till:30/09/2020 text:3.5 color:out_of_support
 bar:3.4 from:16/03/2014 till:18/03/2019 text:3.4 color:out_of_support
 bar:3.3 from:29/09/2012 till:29/09/2017 text:3.3 color:out_of_support
 bar:3.2 from:20/02/2011 till:20/02/2016 text:3.2 color:out_of_support
 bar:3.1 from:27/06/2009 till:01/06/2012 text:3.1 color:out_of_support
 bar:3.0 from:03/12/2008 till:27/06/2009 text:3.0 color:out_of_support
 bar:2.7 from:03/07/2010 till:01/01/2020 text:2.7 color:out_of_support
 bar:2.6 from:01/10/2008 till:29/10/2013 text:2.6 color:out_of_support
 bar:2.5 from:19/09/2006 till:26/05/2011 text:2.5 color:out_of_support
 bar:2.4 from:30/11/2004 till:19/12/2008 text:2.4 color:out_of_support
 bar:2.3 from:29/06/2003 till:11/03/2008 text:2.3 color:out_of_support
 bar:2.2 from:21/12/2001 till:30/05/2003 text:2.2 color:out_of_support
 bar:2.1 from:15/04/2001 till:09/04/2002 text:2.1 color:out_of_support
 bar:2.0 from:16/10/2000 till:22/06/2001 text:2.0 color:out_of_support
 bar:1.6 from:14/04/1999 till:16/10/2000 text:1.6 color:out_of_support
 bar:1.5 from:03/01/1998 till:13/04/1999 text:1.5 color:out_of_support
 bar:1.4 from:25/10/1996 till:03/01/1998 text:1.4 color:out_of_support
 bar:1.3 from:13/10/1995 till:25/10/1996 text:1.3 color:out_of_support
 bar:1.2 from:13/04/1995 till:13/10/1995 text:1.2 color:out_of_support
 bar:1.1 from:11/10/1994 till:13/04/1995 text:1.1 color:out_of_support
 bar:1.0 from:26/01/1994 till:11/10/1994 text:1.0 color:out_of_support
 bar:0.9 from:20/02/1991 till:26/01/1994 text:0.9 color:out_of_support

</timeline>

See also

References

Шаблон:Reflist

External links

  1. 1,0 1,1 1,2 Шаблон:Cite web
  2. 2,00 2,01 2,02 2,03 2,04 2,05 2,06 2,07 2,08 2,09 2,10 2,11 2,12 2,13 2,14 2,15 2,16 Ошибка цитирования Неверный тег <ref>; для сносок timeline-of-python не указан текст
  3. 3,0 3,1 Шаблон:Cite web
  4. Шаблон:Cite web
  5. Шаблон:Cite web
  6. Шаблон:Cite news
  7. Шаблон:Cite web
  8. 8,0 8,1 8,2 8,3 Шаблон:Cite web
  9. 9,0 9,1 Шаблон:Cite web
  10. 10,0 10,1 10,2 Ошибка цитирования Неверный тег <ref>; для сносок pep-3000 не указан текст
  11. Шаблон:Cite web
  12. Шаблон:Cite web
  13. Шаблон:Cite web
  14. Шаблон:Cite web
  15. Шаблон:Cite web
  16. Шаблон:Cite web
  17. Шаблон:Cite web
  18. Шаблон:Cite web
  19. Шаблон:Cite web
  20. 20,0 20,1 Шаблон:Cite web
  21. Ошибка цитирования Неверный тег <ref>; для сносок pep-0227 не указан текст
  22. Шаблон:Cite web
  23. Шаблон:Cite web
  24. Ошибка цитирования Неверный тег <ref>; для сносок pep-0255 не указан текст
  25. Шаблон:Cite web
  26. Шаблон:Cite web
  27. 27,0 27,1 27,2 27,3 27,4 27,5 Ошибка цитирования Неверный тег <ref>; для сносок pep-0361 не указан текст
  28. Шаблон:Cite web
  29. Ошибка цитирования Неверный тег <ref>; для сносок pep-0404 не указан текст
  30. Шаблон:Cite web
  31. Шаблон:Cite web
  32. 32,0 32,1 32,2 32,3 Ошибка цитирования Неверный тег <ref>; для сносок pep-0373 не указан текст
  33. Шаблон:Cite web
  34. Шаблон:Cite web
  35. Ruby, Sam; 2to3, September 1, 2007
  36. Coghlan, Nick; Python 3 Q & A, June 29, 2012
  37. Ошибка цитирования Неверный тег <ref>; для сносок pep-3105 не указан текст
  38. Шаблон:Cite web
  39. Шаблон:Cite web
  40. Ошибка цитирования Неверный тег <ref>; для сносок pep-3107 не указан текст
  41. Ошибка цитирования Неверный тег <ref>; для сносок pep-3137 не указан текст
  42. 42,0 42,1 42,2 Ошибка цитирования Неверный тег <ref>; для сносок releases не указан текст
  43. Ошибка цитирования Неверный тег <ref>; для сносок pep-0160 не указан текст
  44. 44,00 44,01 44,02 44,03 44,04 44,05 44,06 44,07 44,08 44,09 44,10 44,11 44,12 Ошибка цитирования Неверный тег <ref>; для сносок downloads не указан текст
  45. Ошибка цитирования Неверный тег <ref>; для сносок pep-0200 не указан текст
  46. Ошибка цитирования Неверный тег <ref>; для сносок pep-0226 не указан текст
  47. Ошибка цитирования Неверный тег <ref>; для сносок pep-0251 не указан текст
  48. Ошибка цитирования Неверный тег <ref>; для сносок pep-0283 не указан текст
  49. Ошибка цитирования Неверный тег <ref>; для сносок pep-0320 не указан текст
  50. Ошибка цитирования Неверный тег <ref>; для сносок pep-0356 не указан текст
  51. Ошибка цитирования Неверный тег <ref>; для сносок devcycle не указан текст
  52. 52,0 52,1 52,2 Ошибка цитирования Неверный тег <ref>; для сносок pep-0375 не указан текст
  53. Шаблон:Cite mailing list
  54. 54,0 54,1 54,2 54,3 Ошибка цитирования Неверный тег <ref>; для сносок pep-0392 не указан текст
  55. 55,0 55,1 55,2 55,3 Ошибка цитирования Неверный тег <ref>; для сносок pep-0398 не указан текст
  56. 56,0 56,1 56,2 Ошибка цитирования Неверный тег <ref>; для сносок pep-0429 не указан текст
  57. Шаблон:Cite mailing list
  58. 58,0 58,1 58,2 Ошибка цитирования Неверный тег <ref>; для сносок pep-0478 не указан текст
  59. Шаблон:Cite mailing list
  60. 60,0 60,1 60,2 60,3 Ошибка цитирования Неверный тег <ref>; для сносок pep-0494 не указан текст
  61. 61,0 61,1 61,2 61,3 Ошибка цитирования Неверный тег <ref>; для сносок pep-0537 не указан текст
  62. 62,0 62,1 62,2 62,3 Ошибка цитирования Неверный тег <ref>; для сносок pep-0569 не указан текст
  63. 63,0 63,1 63,2 63,3 Ошибка цитирования Неверный тег <ref>; для сносок pep-0596 не указан текст
  64. Ошибка цитирования Неверный тег <ref>; для сносок pep-0602 не указан текст
  65. 65,0 65,1 65,2 65,3 Ошибка цитирования Неверный тег <ref>; для сносок pep-0619 не указан текст
  66. 66,0 66,1 66,2 66,3 Ошибка цитирования Неверный тег <ref>; для сносок pep-0664 не указан текст
  67. 67,0 67,1 67,2 67,3 Ошибка цитирования Неверный тег <ref>; для сносок pep-0693 не указан текст
  68. 68,0 68,1 68,2 68,3 Ошибка цитирования Неверный тег <ref>; для сносок pep-0719 не указан текст