Content deleted Content added
Z. Patterson (talk | contribs) m The article appears to have American English. |
Changed image of Guido van Rossum to a recent image. |
||
(37 intermediate revisions by 25 users not shown) | |||
Line 69:
|archive-url=https://web.archive.org/web/20181226141123/http://speakingjs.com/es5/ch03.html%0A
|url-status=live
}}</ref> [[Julia (programming language)|Julia]],<ref name=Julia/> [[Mojo (programming language)|Mojo]],<ref name="Mojo">{{Cite web |last=Krill |first=Paul |date=2023-05-04 |title=Mojo language marries Python and MLIR for AI development |url=https://www.infoworld.com/article/3695588/mojo-language-marries-python-and-mlir-for-ai-development.html |access-date=2023-05-05 |website=InfoWorld |language=en |archive-date=5 May 2023 |archive-url=https://web.archive.org/web/20230505064554/https://www.infoworld.com/article/3695588/mojo-language-marries-python-and-mlir-for-ai-development.html |url-status=live}}</ref> [[Nim (programming language)|Nim]], [[Ring (programming language)|Ring]],<ref name="The Ring programming language and other languages">{{cite web |url=http://ring-lang.sourceforge.net/doc1.6/introduction.html#ring-and-other-languages |title=Ring and other languages |author=Ring Team |date=4 December 2017 |work=ring-lang.net |publisher=[[ring-lang]] |access-date=4 December 2017 |archive-date=25 December 2018 |archive-url=https://web.archive.org/web/20181225175312/http://ring-lang.sourceforge.net/doc1.6/introduction.html#ring-and-other-languages |url-status=live}}</ref> [[Ruby (programming language)|Ruby]],<ref name="bini"/> [[Swift (programming language)|Swift]],<ref name="lattner2014">{{Cite web |url=http://nondot.org/sabre/ |title=Chris Lattner's Homepage |last=Lattner |first=Chris |date=3 June 2014 |access-date=3 June 2014 |publisher=Chris Lattner |quote=The Swift language is the product of tireless effort from a team of language experts, documentation gurus, compiler optimization ninjas, and an incredibly important internal dogfooding group who provided feedback to help refine and battle-test ideas. Of course, it also greatly benefited from the experiences hard-won by many other languages in the field, drawing ideas from Objective-C, Rust, Haskell, Ruby, Python, C#, CLU, and far too many others to list. |archive-date=25 December 2018 |archive-url=https://web.archive.org/web/20181225175312/http://nondot.org/sabre/ |url-status=live}}</ref> [[V (programming language)|V]]<ref name="vpeople">{{Cite web |title=V documentation (Introduction) |url=https://github.com/vlang/v/blob/master/doc/docs.md#introduction |access-date=2024-12-24|website=GitHub |language=en}}</ref>
<!-- Do not put in as there's also a pure Java implementation (Jython): | programming language = [[C (programming language)|C]] -->
| wikibooks = Python Programming
Line 76:
'''Python''' is a [[high-level programming language|high-level]], [[general-purpose programming language]]. Its design philosophy emphasizes [[code readability]] with the use of [[significant indentation]].<ref name="AutoNT-7"/>
Python is [[type system#DYNAMIC|dynamically
[[Guido van Rossum]] began working on Python in the late 1980s as a successor to the [[ABC (programming language)|ABC]] programming language and first released it in 1991 as Python 0.9.0.<ref>{{Cite web|last=Rossum|first=Guido Van|date=2009-01-20|title=The History of Python: A Brief Timeline of Python|url=https://python-history.blogspot.com/2009/01/brief-timeline-of-python.html|access-date=2021-03-05|website=The History of Python|archive-date=5 June 2020|archive-url=https://web.archive.org/web/20200605032200/https://python-history.blogspot.com/2009/01/brief-timeline-of-python.html|url-status=live}}</ref> Python 2.0 was released in 2000. Python 3.0, released in 2008, was a major revision not completely [[backward-compatible]] with earlier versions. Python 2.7.18, released in 2020, was the last release of Python 2.<ref>{{Cite web|url=https://pythoninsider.blogspot.com/2020/04/python-2718-last-release-of-python-2.html|title= Python 2.7.18, the last release of Python 2|last=Peterson|first=Benjamin|date=20 April 2020|website=Python Insider|access-date=27 April 2020|archive-date=26 April 2020|archive-url=https://web.archive.org/web/20200426204118/https://pythoninsider.blogspot.com/2020/04/python-2718-last-release-of-python-2.html|url-status=live}}</ref>
Line 84:
==History==
{{Main|History of Python}}
[[File:Guido van Rossum
Python was conceived in the late 1980s<ref name="venners-interview-pt-1"/> by [[Guido van Rossum]] at [[Centrum Wiskunde & Informatica]] (CWI) in the [[Netherlands]] as a successor to the [[ABC (programming language)|ABC]] programming language, which was inspired by [[SETL]],<ref name="AutoNT-12"/> capable of [[exception handling]] and interfacing with the [[Amoeba (operating system)|Amoeba]] operating system.<ref name="faq-created"/> Its implementation began in December 1989.<ref name="timeline-of-python"/> Van Rossum shouldered sole responsibility for the project, as the lead developer, until 12 July 2018, when he announced his "permanent vacation" from his responsibilities as Python's "[[benevolent dictator for life]]" (BDFL), a title the Python community bestowed upon him to reflect his long-term commitment as the project's chief decision-maker<ref name="lj-bdfl-resignation"/> (he has since come out of retirement and is self-titled "BDFL-emeritus"<!-- on his Twitter-->). In January 2019, active Python core developers elected a five-member Steering Council to lead the project.<ref>{{cite web |title=PEP 8100 |url=https://www.python.org/dev/peps/pep-8100/ |publisher=Python Software Foundation |access-date=4 May 2019 |archive-date=4 June 2020 |archive-url=https://web.archive.org/web/20200604235027/https://www.python.org/dev/peps/pep-8100/ |url-status=live}}</ref><ref>{{Cite web|title=PEP 13 – Python Language Governance|url=https://www.python.org/dev/peps/pep-0013/|access-date=2021-08-25|website=Python.org|language=en|archive-date=27 May 2021|archive-url=https://web.archive.org/web/20210527000035/https://www.python.org/dev/peps/pep-0013/|url-status=live}}</ref>
The name Python is said to come from the British comedy series [[Monty Python's Flying Circus]].<ref name=":0">{{Cite book |last1=Briggs |first1=Jason R. |title=Python for kids: a playful introduction to programming |last2=Lipovača |first2=Miran |date=2013 |publisher=No Starch Press |isbn=978-1-59327-407-8 |location=San Francisco, Calif}}</ref>
Python 2.0 was released on 16 October 2000, with many major new features such as [[list comprehension]]s, [[cycle detection|cycle-detecting]] garbage collection, [[reference counting]], and [[Unicode]] support.<ref name="newin-2.0"/> Python 2.7's [[end-of-life product|end-of-life]] was initially set for 2015, then postponed to 2020 out of concern that a large body of existing code could not easily be forward-ported to Python 3.<ref>{{cite web |url=https://legacy.python.org/dev/peps/pep-0373/ |title=PEP 373 – Python 2.7 Release Schedule |work=python.org |access-date=9 January 2017 |archive-date=19 May 2020 |archive-url=https://web.archive.org/web/20200519075520/https://legacy.python.org/dev/peps/pep-0373/ |url-status=live}}</ref><ref>{{cite web |url=https://www.python.org/dev/peps/pep-0466/ |title=PEP 466 – Network Security Enhancements for Python 2.7.x |work=python.org |access-date=9 January 2017 |archive-date=4 June 2020 |archive-url=https://web.archive.org/web/20200604232833/https://www.python.org/dev/peps/pep-0466/ |url-status=live}}</ref> No further security patches or other improvements will be released for it.<ref>{{Cite web|url=https://www.python.org/doc/sunset-python-2/|title=Sunsetting Python 2|website=Python.org|language=en|access-date=22 September 2019|archive-date=12 January 2020|archive-url=https://web.archive.org/web/20200112080903/https://www.python.org/doc/sunset-python-2/|url-status=live}}</ref><ref>{{Cite web|url=https://www.python.org/dev/peps/pep-0373/|title=PEP 373 – Python 2.7 Release Schedule|website=Python.org|language=en|access-date=22 September 2019|archive-date=13 January 2020|archive-url=https://web.archive.org/web/20200113033257/https://www.python.org/dev/peps/pep-0373/|url-status=live}}</ref> While Python 2.7 and older versions are officially unsupported, a different unofficial Python implementation, [[PyPy]], continues to support Python 2, i.e. "2.7.18+" (plus 3.10), with the plus meaning (at least some) "[[backporting|backported]] security updates".<ref>{{Cite web |last=mattip |date=2023-12-25 |title=PyPy v7.3.14 release |url=https://www.pypy.org/posts/2023/12/pypy-v7314-release.html |access-date=2024-01-05 |website=PyPy |language=en |archive-date=5 January 2024 |archive-url=https://web.archive.org/web/20240105132820/https://www.pypy.org/posts/2023/12/pypy-v7314-release.html |url-status=live}}</ref>
Line 92 ⟶ 93:
Python 3.0 was released on 3 December 2008, with some new semantics and changed syntax. At least every Python release since (now unsupported) 3.5 has added some syntax to the language, and a few later releases have dropped outdated modules, or changed semantics, at least in a minor way.
{{As of|2024|10|07|since=y}}, Python 3.13 is the latest stable release, and it and, for few more months, 3.12 are the only releases with active support including for
Security updates were expedited in 2021 (and again twice in 2022, and more fixed in 2023 and in September 2024 for Python 3.12.6 down to 3.8.20), since all Python versions were insecure (including 2.7<ref>{{Cite web|title=CVE-2021-3177 |url=https://access.redhat.com/security/cve/cve-2021-3177|access-date=2021-02-26|website=Red Hat Customer Portal |archive-date=6 March 2021|archive-url=https://web.archive.org/web/20210306183700/https://access.redhat.com/security/cve/cve-2021-3177|url-status=live}}</ref>) because of security issues leading to possible [[remote code execution]]<ref>{{Cite web|title=CVE-2021-3177|url=https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3177|access-date=2021-02-26|website=CVE|archive-date=27 February 2021|archive-url=https://web.archive.org/web/20210227192918/https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3177|url-status=live}}</ref> and [[cache poisoning|web-cache poisoning]].<ref>{{Cite web|title=CVE-2021-23336|url=https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-23336|access-date=2021-02-26|website=CVE|archive-date=24 February 2021|archive-url=https://web.archive.org/web/20210224160700/https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-23336|url-status=live}}</ref> <!-- In 2022, Python 3.10.4 and 3.9.12 were expedited<ref>{{Cite web |last=Langa |first=Łukasz |date=2022-03-24 |title=Python 3.10.4 and 3.9.12 are now available out of schedule |url=https://pythoninsider.blogspot.com/2022/03/python-3104-and-3912-are-now-available.html |access-date=2022-04-19 |website=Python Insider |archive-date=21 April 2022 |archive-url=https://web.archive.org/web/20220421205820/https://pythoninsider.blogspot.com/2022/03/python-3104-and-3912-are-now-available.html |url-status=live}}</ref> and 3.8.13, because of many security issues.<ref>{{Cite web |last=Langa |first=Łukasz |date=2022-03-16 |title=Python 3.10.3, 3.9.11, 3.8.13, and 3.7.13 are now available with security content |url=https://pythoninsider.blogspot.com/2022/03/python-3103-3911-3813-and-3713-are-now.html |access-date=2022-04-19 |website=Python Insider |archive-date=17 April 2022 |archive-url=https://web.archive.org/web/20220417215022/https://pythoninsider.blogspot.com/2022/03/python-3103-3911-3813-and-3713-are-now.html |url-status=live}}</ref> --> <!-- On 7 September 2022, four new releases were made due to a potential [[denial-of-service attack]]: 3.10.7, 3.9.14, 3.8.14, and 3.7.14.<ref>{{Cite web |title=Python releases 3.10.7, 3.9.14, 3.8.14, and 3.7.14 are now available |work=Python Insider |first1=Łukasz |last1=Langa |date=7 September 2022 |access-date=16 September 2022 |url=https://pythoninsider.blogspot.com/2022/09/python-releases-3107-3914-3814-and-3714.html |archive-date=13 September 2022 |archive-url=https://web.archive.org/web/20220913001104/https://pythoninsider.blogspot.com/2022/09/python-releases-3107-3914-3814-and-3714.html |url-status=live}}</ref><ref>{{Cite web |title=CVE-2020-10735 |work=CVE |access-date=16 September 2022 |url=https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10735 |archive-date=20 September 2022 |archive-url=https://web.archive.org/web/20220920170528/https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10735 |url-status=live}}</ref> -->
Line 110 ⟶ 111:
There are no compensating advantages for the current behavior; it is unreliable and slow.
..
The current implementation --> [and it
Some (more) standard library modules and many deprecated classes, functions and methods, will be removed in Python 3.15 or 3.16.<ref>{{Cite web |last=Wouters |first=Thomas |date=2024-04-09 |title=Python Insider: Python 3.12.3 and 3.13.0a6 released |url=https://pythoninsider.blogspot.com/2024/04/python-3123-and-3130a6-released.html |access-date=2024-04-29 |website=Python Insider}}</ref><ref>{{cite web |title=PEP 594 – Removing dead batteries from the standard library |url=https://peps.python.org/pep-0594/ |website=Python Enhancement Proposals |publisher=Python Softtware Foundation |date=20 May 2019}}</ref>
Python 3.
Python 3.14 is now in alpha 3; <!-- has changes for annotations <!- "PEP 563 [for Python 3.7 also] changed the semantics of annotations. ->, with PEP 649 "[preserving] nearly all existing behavior of annotations from stock semantics<!- .. This will print <class 'str'> with stock semantics and <class 'int'> when this PEP is active. This is therefore a backwards-incompatible change. However, this example is poor programming style, so this change seems acceptable. ->".<ref>{{Cite web |title=PEP 649 – Deferred Evaluation Of Annotations Using Descriptors {{!}} peps.python.org |url=https://peps.python.org/pep-0649/ |access-date=2024-10-16 |website=Python Enhancement Proposals (PEPs) |language=en}}</ref>
PEP 649 is an "Accepted PEP" and seemingly implemented in 3.14, however there is under "Open PEPs (under consideration)":
-->regarding possible change to annotations: "In Python 3.14, <code>from __future__ import</code> annotations will continue to work as it did before, converting annotations into strings."
"Since PEP 649 was written, Python 3.12 and 3.13 gained support for several new features that also use deferred evaluation, similar to the behavior this PEP proposes for annotations:"--><ref>{{Cite web |title=PEP 749 – Implementing PEP 649 {{!}} peps.python.org |url=https://peps.python.org/pep-0749/ |access-date=2024-11-20 |website=Python Enhancement Proposals (PEPs) |language=en}}</ref>
Line 200 ⟶ 203:
* The <code>+</code>, <code>-</code>, and <code>*</code> operators for mathematical addition, subtraction, and multiplication are similar to other languages, but the behavior of division differs. There are two types of divisions in Python: [[floor division]] (or integer division) <code>//</code> and floating-point<code>/</code>division.<ref>{{cite web|title=division|url=https://docs.python.org|website=python.org|access-date=30 July 2014|archive-date=20 July 2006|archive-url=https://web.archive.org/web/20060720033244/http://docs.python.org/|url-status=live}}</ref> Python uses the <code>**</code> operator for exponentiation.
* Python uses the <code>+</code> operator for string concatenation. Python uses the <code>*</code> operator for duplicating a string a specified number of times.
* The <code>@</code> infix operator<!-- was introduced in Python 3.5-->
* The syntax <code>:=</code>, called the "walrus operator", was introduced in Python 3.8. It assigns values to variables as part of a larger expression.<ref name=Python3.8Changelog>{{cite web |title=What's New in Python 3.8 |url=https://docs.python.org/3.8/whatsnew/3.8.html |access-date=14 October 2019 |archive-date=8 June 2020 |archive-url=https://web.archive.org/web/20200608124345/https://docs.python.org/3.8/whatsnew/3.8.html |url-status=live}}</ref>
* In Python, <code>==</code> compares by value. Python's <code>is</code> operator may be used to compare object identities (comparison by reference), and comparisons may be chained—for example, {{code|lang=python|code=a <= b <= c}}.
Line 360 ⟶ 363:
Due to Python's extensive mathematics library, and the third-party library [[NumPy]] that further extends the native capabilities, it is frequently used as a scientific scripting language to aid in problems such as numerical data processing and manipulation.<ref>{{Cite web|url=https://www.stat.washington.edu/~hoytak/blog/whypython.html|title=10 Reasons Python Rocks for Research (And a Few Reasons it Doesn't) – Hoyt Koepke|website=University of Washington Department of Statistics |access-date=3 February 2019|archive-date=31 May 2020|archive-url=https://web.archive.org/web/20200531211840/https://www.stat.washington.edu/~hoytak/blog/whypython.html|url-status=dead}}</ref><ref>{{Cite web|url=https://engineering.ucsb.edu/~shell/che210d/python.pdf|title=An introduction to Python for scientific computing|last=Shell|first=Scott|date=17 June 2014|access-date=3 February 2019|archive-date=4 February 2019|archive-url=https://web.archive.org/web/20190204014642/https://engineering.ucsb.edu/~shell/che210d/python.pdf|url-status=live}}</ref>
=== Function syntax ===
Functions are created in Python using the <code>def</code> keyword. In Python, you define the function as if you were calling it, by typing the function name and then the attributes required. Here is an example of a function that will print whatever is given:<syntaxhighlight lang="python3">
def printer(input1, input2="already there"):
print(input1)
print(input2)
printer("hello")
# Example output:
# hello
# already there
</syntaxhighlight>If you want the attribute to have a set value if no value is given, use the variable-defining syntax inside the function definition.
==Programming examples==
Line 466 ⟶ 482:
Older projects (or not to be used with Python 3.x and latest syntax):
* Google's Grumpy (latest release in 2017) [[transpile]]s Python 2 to [[Go (programming language)|Go]].<ref>{{Cite web|url=https://github.com/google/grumpy|title=google/grumpy|date=10 April 2020|via=GitHub|access-date=25 March 2020|archive-date=15 April 2020|archive-url=https://web.archive.org/web/20200415054919/https://github.com/google/grumpy|url-status=live}}</ref><ref>{{Cite web|url=https://opensource.google/projects/|title=Projects|website=opensource.google|access-date=25 March 2020|archive-date=24 April 2020|archive-url=https://web.archive.org/web/20200424191248/https://opensource.google/projects/|url-status=live}}</ref><ref>{{Cite
* [[IronPython]]<!-- (abandoned by Microsoft) --> allows running Python 2.7 programs (and an [[Software release life cycle#Alpha|alpha]], released in 2021, is also available for "Python 3.4, although features and behaviors from later versions may be included"<ref>{{Cite web |url=https://github.com/IronLanguages/ironpython3 |title=GitHub – IronLanguages/ironpython3: Implementation of Python 3.x for .NET Framework that is built on top of the Dynamic Language Runtime<!-- Bot generated title --> |website=[[GitHub]] |archive-date=28 September 2021 |archive-url=https://web.archive.org/web/20210928101250/https://github.com/IronLanguages/ironpython3 |url-status=live}}</ref>) on the .NET [[Common Language Runtime]].<ref>{{Cite web|title=IronPython.net /|url=https://ironpython.net/|website=ironpython.net|archive-date=17 April 2021|archive-url=https://web.archive.org/web/20210417064418/https://ironpython.net/|url-status=live}}</ref>
* [[Jython]] compiles Python 2.7 to Java bytecode, allowing the use of the Java libraries from a Python program.<ref>{{Cite web|title=Jython FAQ|url=https://www.jython.org/jython-old-sites/archive/22/userfaq.html|access-date=2021-04-22|website=www.jython.org|archive-date=22 April 2021|archive-url=https://web.archive.org/web/20210422055726/https://www.jython.org/jython-old-sites/archive/22/userfaq.html|url-status=live}}</ref>
Line 482 ⟶ 498:
* Backward-incompatible versions, where code is expected to break and needs to be manually [[ported]]. The first part of the version number is incremented. These releases happen infrequently—version 3.0 was released 8 years after 2.0. According to Guido van Rossum, a version 4.0 is very unlikely to ever happen.<ref>{{Cite web |last=Hughes |first=Owen |date=2021-05-24 |title=Programming languages: Why Python 4.0 might never arrive, according to its creator |url=https://www.techrepublic.com/article/programming-languages-why-python-4-0-will-probably-never-arrive-according-to-its-creator/ |access-date=2022-05-16 |website=TechRepublic |language=en-US |archive-date=14 July 2022 |archive-url=https://web.archive.org/web/20220714201302/https://www.techrepublic.com/article/programming-languages-why-python-4-0-will-probably-never-arrive-according-to-its-creator/ |url-status=live}}</ref>
* Major or "feature" releases are largely compatible with the previous version but introduce new features. The second part of the version number is incremented. Starting with Python 3.9, these releases are expected to happen annually.<ref>{{Cite web|url=https://www.python.org/dev/peps/pep-0602/|title=PEP 602 – Annual Release Cycle for Python|website=Python.org|language=en|access-date=6 November 2019|archive-date=14 June 2020|archive-url=https://web.archive.org/web/20200614202755/https://www.python.org/dev/peps/pep-0602/|url-status=live}}</ref><ref>{{Cite web|url=https://lwn.net/Articles/802777/|title=Changing the Python release cadence [LWN.net]|website=lwn.net|access-date=6 November 2019|archive-date=6 November 2019|archive-url=https://web.archive.org/web/20191106170153/https://lwn.net/Articles/802777/|url-status=live}}</ref> Each major version is supported by bug fixes for several years after its release.<ref name="release-schedule"/>
*
Many [[beta release|alpha, beta, and release-candidates]] are also released as previews and for testing before final releases. Although there is a rough schedule for each release, they are often delayed if the code is not ready. Python's development team monitors the state of the code by running the large [[unit test]] suite during development.<ref name="AutoNT-23"/>
Line 523 ⟶ 539:
Python can also be used for [[graphical user interface]] (GUI) by using libraries like [[Tkinter]].<ref>{{cite web |url=https://docs.python.org/3/library/tkinter.html |title=Tkinter — Python interface to TCL/Tk |access-date=9 June 2023 |archive-date=18 October 2012 |archive-url=https://web.archive.org/web/20121018043136/http://docs.python.org/library/tkinter.html |url-status=live}}</ref><ref>{{cite web |url=https://www.geeksforgeeks.org/python-tkinter-tutorial/ |title=Python Tkinter Tutorial |date=3 June 2020 |access-date=9 June 2023 |archive-date=9 June 2023 |archive-url=https://web.archive.org/web/20230609031631/https://www.geeksforgeeks.org/python-tkinter-tutorial/ |url-status=live}}</ref>
Python has been successfully embedded in many software products as a scripting language, including in [[finite element method]] software such as [[Abaqus]], 3D parametric modelers like [[FreeCAD]], 3D animation packages such as [[3ds Max]], [[Blender (software)|Blender]], [[Cinema 4D]], [[LightWave 3D|Lightwave]], [[Houdini (software)|Houdini]], [[Maya (software)|Maya]], [[modo (software)|modo]], [[MotionBuilder]], [[Autodesk Softimage|Softimage]], the visual effects compositor [[Nuke (software)|Nuke]], 2D imaging programs like [[GIMP]],<ref>{{cite web |url=http://gimp-win.sourceforge.net/faq.html |title=Installers for GIMP for Windows – Frequently Asked Questions |author=<!-- Staff writer(s); no by-line. --> |date=26 July 2013 |access-date=26 July 2013 |url-status=dead |archive-url=https://web.archive.org/web/20130717070814/http://gimp-win.sourceforge.net/faq.html |archive-date=17 July 2013}}</ref> [[Inkscape]], [[Scribus]] and [[Paint Shop Pro]],<ref name="AutoNT-38"/> and [[musical notation]] programs like [[scorewriter]] and [[Capella (notation program)|capella]]. [[GNU Debugger]] uses Python as a [[pretty printer]] to show complex structures such as C++ containers. [[Esri]] promotes Python as the best choice for writing scripts in [[ArcGIS]].<ref name="AutoNT-39"/> It has also been used in several video games,<ref name="AutoNT-40"/><ref name="AutoNT-41"/> and has been adopted as first of the three available [[programming language]]s in [[Google App Engine]], the other two being [[Java (software platform)|Java]] and [[Go (programming language)|Go]].<ref name="AutoNT-42"/>
Many operating systems include Python as a standard component. It ships with most [[Linux distribution]]s,<ref>{{Cite web|url=https://docs.python.org/3/using/unix.html|title=Python Setup and Usage|publisher=Python Software Foundation|access-date=10 January 2020|archive-date=17 June 2020|archive-url=https://web.archive.org/web/20200617143505/https://docs.python.org/3/using/unix.html|url-status=live}}</ref> [[AmigaOS 4]] (using Python 2.7), [[FreeBSD]] (as a package), [[NetBSD]], and [[OpenBSD]] (as a package) and can be used from the command line (terminal). Many Linux distributions use installers written in Python: [[Ubuntu]] uses the [[Ubiquity (software)|Ubiquity]] installer, while [[Red Hat Linux]] and [[Fedora Linux]] use the [[Anaconda (installer)|Anaconda]] installer. [[Gentoo Linux]] uses Python in its [[package management system]], [[Portage (software)|Portage]].
Line 558 ⟶ 574:
* [[History of programming languages]]
* [[Comparison of programming languages]]
{{Clear}}
Line 596 ⟶ 613:
<ref name="newin-2.0">{{cite web |url=https://docs.python.org/whatsnew/2.0.html |title=What's New in Python 2.0 |last1=Kuchling |first1=A. M. |last2=Zadka |first2=Moshe |date=16 October 2000 |publisher=Python Software Foundation |access-date=11 February 2012 |archive-date=23 October 2012 |archive-url=https://web.archive.org/web/20121023112045/http://docs.python.org/whatsnew/2.0.html |url-status=live}}</ref>
<ref name="AutoNT-13">{{cite web |url=https://www.python.org/community/pycon/dc2004/papers/24/metaclasses-pycon.pdf |archive-url=https://web.archive.org/web/20090530030205/http://www.python.org/community/pycon/dc2004/papers/24/metaclasses-pycon.pdf |archive-date=30 May 2009 |title=Python Metaclasses: Who? Why? When? |last=The Cain Gang Ltd. |access-date=27 June 2009 |url-status=dead}}</ref>
Line 756 ⟶ 771:
7. Neutrality on the part of editors is essential. In terms of major debates, items representing all major positions should be included, with annotations indicating the specific POV of each. We may have to work out rules where topic disputes are irreconcilable.
-->
* {{cite book |last=Downey |first=Allen
* {{cite book |last=Lutz |first=Mark |title=Learning Python |publisher=O'Reilly Media |year=2013 |edition=5th |isbn=978-0-596-15806-4}}
* {{cite book |last=Summerfield |first=Mark |title=Programming in Python 3 |publisher=Addison-Wesley Professional|year=2009|edition=2nd|isbn=978-0-321-68056-3}}
Line 775 ⟶ 789:
{{Sister project links |wikt=no |display=Python |commons=Category:Python (programming language) |b=Python Programming |n=no |s=no |voy=no |species=no |d=Q28865}}
* {{Official website}}
* [https://docs.python.org/3/tutorial/ The Python Tutorial]
{{Python (programming language)|state=expanded}}
|