FazBrowse Wikipedia Viewer | Main Page |
Search Wikipedia:
|
Viewing: https://en.wikipedia.org/wiki/Python_code

Python (programming language)

{{Cite web |title=General Python FAQ – Python 3 documentation |url=https://docs.python.org/3/faq/general.html#what-is-python |access-date=7 July 2024 |website=docs.python.org}}</ref> [[Procedural programming|procedural]] ([[Imperative programming|imperative]]), [[Functional programming|functional]], [[Structured programming|structured]], [[Reflective programming|reflective]]"},"released":{"wt":"{{start date and age|1991|02|20|df=y}}<ref name=\"alt-sources-history\">{{cite web |title=Python 0.9.1 part 01/21 |url=https://www.tuhs.org/Usenet/alt.sources/1991-February/001749.html |url-status=live |archive-url=https://web.archive.org/web/20210811171015/https://www.tuhs.org/Usenet/alt.sources/1991-February/001749.html |archive-date=11 August 2021 |access-date=11 August 2021 |publisher=alt.sources archives}}</ref>"},"designer":{"wt":"[[Guido van Rossum]]"},"developer":{"wt":"[[Python Software Foundation]]"},"latest release version":{"wt":"{{wikidata|property|edit|reference|P548=Q2804309|P348}}"},"latest release date":{"wt":"{{start date and age|{{wikidata|qualifier|single|P548=Q2804309|P348|P577}}}}"},"latest preview version":{"wt":"<!-- 3.15.0rc1 4 August 2026 {{wikidata|property|edit|reference|P548=Q51930650|P348}} doesn't work, nor what AI suggested as fix: {{#invoke:Wikidata | claim | P348 | qualifier = P548:Q51930650 | rank = best }} -->"},"latest preview date":{"wt":"{{start date and age|2025|08|18|df=y}} <!-- {{start date and age|{{wikidata|qualifier|Q28865 |P548=Q51930650|P348|P577}}}} nor\n{{#invoke:Wikidata | qualifier | P348 | P577 | qualifier = P548:Q51930650 | rank = best | formatting = date }}\n-->"},"typing":{"wt":"[[Duck typing|Duck]], [[Dynamic typing|dynamic]], [[Strong and weak typing|strong]];<ref>{{Cite web |title=Why is Python a dynamic language and also a strongly typed language |url=https://wiki.python.org/moin/Why%20is%20Python%20a%20dynamic%20language%20and%20also%20a%20strongly%20typed%20language |url-status=live |archive-url=https://web.archive.org/web/20210314173706/https://wiki.python.org/moin/Why%20is%20Python%20a%20dynamic%20language%20and%20also%20a%20strongly%20typed%20language |archive-date=14 March 2021 |access-date=27 January 2021 |website=Python Wiki}}</ref> [[Optional typing|optional type annotations]]{{efn|since 3.5, but those hints are ignored, except with unofficial tools<ref name=\"type_hint-PEP\"/>}}"},"memory management":{"wt":"[[Garbage collection (computer science)|Garbage-collected]]"},"implementations":{"wt":"[[CPython]], [[PyPy]], [[MicroPython]], [[CircuitPython]], [[IronPython]], [[Jython]], [[Stackless Python]]"},"operating system":{"wt":"[[Cross-platform]]{{efn|* '''Tier 1''': 64-bit [[Linux]], [[macOS]]; 64- and 32-bit [[Windows]]<!-- Windows 8.1 supported with 3.10 to 3.13 but only Windows 10+ with latest Python 3.14+--><ref>{{Cite web |last1=von Löwis |first1=Martin |last2=Cannon |first2=Brett |title=PEP 11 – CPython platform support |url=https://peps.python.org/pep-0011/ |access-date=22 April 2024 |website=Python Enhancement Proposals (PEPs) |language=en}}</ref><!--Not \"Windows for IoT and embedded systems\"; NOT UNIX, it's not listed, nor any Unix-like, maybe implied Possibly Windows 8.1 is also supported on at least Python 3.9? Might also work on latest, seems too minor to mention, for any Python version. Windows 7 and 8 are prevented to work on Python 3.9, though it might not rule out 8.1, also some info like this might be a bit wrong:\n\n\"Windows 8 and newer for Python 3.9\nFreeBSD 10 and newer\nmacOS Snow Leopard (macOS 10.6, 2008) and newer\"\n-->\n* '''Tier 2''': E.g. 32-bit [[WebAssembly]] (WASI) <!-- (WASI SDK, Wasmtime) meaning wasm32-unknown-wasi; wasm32-unknown-emscripten is unsupported since 3.13. aarch64-pc-windows-msvc and powerpc64le-unknown-linux-gnu -->\n* '''Tier 3''': 64-bit [[Android (operating system)|Android]]<!-- too much trivia to mention \"5.0+\", even if true, it seemingly is, and corresponding API levels, but thouse are ancient, possibly even only way more recent is officially supported? -->,<ref>{{Cite web |title=PEP 738 – Adding Android as a supported platform {{!}} peps.python.org |url=https://peps.python.org/pep-0738/ |access-date=19 May 2024 |website=Python Enhancement Proposals (PEPs) |language=en}}</ref> [[iOS]], [[FreeBSD]], and (32-bit) [[Raspberry Pi OS]]<br />Unofficial (or has been known to work): Other [[Unix-like]]/[[BSD]] variants) and a few other platforms<!-- Used to support many more, only few support latest 3.9+ --><ref name=\"DownloadOther\"/><ref>{{Cite web |title=test – Regression tests package for Python |url=https://docs.python.org/3.7/library/test.html?highlight=android#test.support.is_android |url-status=live |archive-url=https://web.archive.org/web/20220517151240/https://docs.python.org/3.7/library/test.html?highlight=android#test.support.is_android |archive-date=17 May 2022 |access-date=17 May 2022 |website=Python 3.7.17 documentation}}</ref><ref>{{Cite web |title=platform – Access to underlying platform's identifying data |url=https://docs.python.org/3.10/library/platform.html?highlight=android |url-status=live |archive-url=https://web.archive.org/web/20220517150826/https://docs.python.org/3/library/platform.html?highlight=android |archive-date=17 May 2022 |access-date=17 May 2022 |website=Python 3.10.4 documentation}}</ref>}}\n\n<!--\nhttps://mail.python.org/archives/list/python-committers@python.org/thread/K757345KX6W5ZLTWYBUXOXQTJJTL7GW5/\n* Alpine / musl is not supported, because our test suite is failing due to bugs and missing features in musl libc.\n* NetBSD and OpenBSD are in a similar state as Alpine: no stable buildbot and AFAIK tests are failing\n* [outdated]\n* Cygwin and MinGW are officially unsupported, see bpo-45537 and bpo-45538\n\n..\n\nThe policy Brett is proposing just makes that explicit and gives us something to point to when someone comes up with a patch to support PDP-11, or when someone's patch for Android breaks Windows. I don't think we'll wind up with tier-support police; if a core dev wants to take responsibility for a patch for a platform that is not tier 3 or above, they can still do that. But if it breaks things for a supported platform, it will be reverted.\n\n..\n\nE.g. Android support was even funded by the PSF recently.[outdated]\nAlso, note that the stdlib does in fact support other Python implementations reusing (parts of) it, e.g. Jython, PyPy and IronPython. Again, without core devs backing these.\n-->"},"license":{"wt":"[[Python Software Foundation License]]"},"file ext":{"wt":".py,<ref name=\"venners-interview-pt-1\" /> .pyc,<ref name=pep488>{{cite web |last1=Cannon |first1=Brett |date=20 February 2015 |title=PEP 488 – Elimination of PYO files |url=https://peps.python.org/pep-0488/ |website=Python Enhancement Proposals (PEPs) |access-date=28 February 2026 |archive-url=https://web.archive.org/web/20260116004856/https://peps.python.org/pep-0488/ |archive-date=16 January 2026 |language=en |quote=A PYC file is the bytecode file generated and read from when no optimization level is specified at interpreter startup [...] <code>.pyc</code> |url-status=live}}</ref> .pyd,<ref name=\"pep273\">{{cite web |last1=Ahlstrom |first1=James C. |title=PEP 273 – Import Modules from Zip Archives |url=https://peps.python.org/pep-0273/ |website=Python Enhancement Proposals (PEPs) |access-date=28 February 2026 |archive-url=https://web.archive.org/web/20260225044635/https://peps.python.org/pep-0273/ |archive-date=25 Feb 2026 |language=en |date=11 October 2001 |quote=Dynamic modules have extensions like <code>.dll</code>, <code>.pyd</code>, and <code>.so</code>. |url-status=live}}</ref> .pyi,<ref name=\"pep561\">{{cite web |last1=Harper Smith |first1=Emma |date=9 September 2017 |title=PEP 561 – Distributing and Packaging Type Information |url=https://peps.python.org/pep-0561/ |website=Python Enhancement Proposals (PEPs) |access-date=28 February 2026 |archive-url=https://web.archive.org/web/20251207013328/https://peps.python.org/pep-0561/ |archive-date=7 December 2025 |language=en |quote='stubs' - files containing only type information, empty of runtime code (the filename ends in <code>.pyi</code>). |url-status=live}}</ref><!-- too much trivia: .pyo (before 3.5),<ref>File extension .pyo was removed in Python 3.5. See [https://www.python.org/dev/peps/pep-0488/ PEP 0488] {{Webarchive|url=https://web.archive.org/web/20200601133202/https://www.python.org/dev/peps/pep-0488/ |date=1 June 2020}}</ref> --> .pyw,<ref name=\"pep397\">{{cite web |last1=Hammond |first1=Mark |last2=von Löwis |first2=Martin |title=PEP 397 – Python launcher for Windows |url=https://peps.python.org/pep-0397/ |website=Python Enhancement Proposals (PEPs) |access-date=28 February 2026 |archive-url=https://web.archive.org/web/20260204012409/https://peps.python.org/pep-0397/ |archive-date=4 February 2026 |language=en |date=15 March 2011 |quote=[...] the 'console' version of the launcher is associated with .py files and the 'windows' version associated with .pyw files. |url-status=live}}</ref> .pyz<!-- Too much trivia?: (since 3.5), since 3.8 latest supported and Python 3.5.10 Sept. 5, 2020--><ref name=\"pep0441\">{{cite web |last1=Holth |first1=Daniel |last2=Moore |first2=Paul |date=30 March 2013 |title=PEP 0441 – Improving Python ZIP Application Support |url=https://www.python.org/dev/peps/pep-0441/ |url-status=live |archive-url=https://web.archive.org/web/20151116044812/https://www.python.org/dev/peps/pep-0441/ |archive-date=16 November 2015 |access-date=12 November 2015 |website=Python Enhancement Proposals (PEPs)}}</ref>"},"website":{"wt":"{{URL|https://www.python.org/|python.org}}"},"dialects":{"wt":"[[Cython]], [[RPython]], [[Starlark]]<ref>{{cite web |title=Starlark Language |url=https://docs.bazel.build/versions/master/skylark/language.html |url-status=live |archive-url=https://web.archive.org/web/20200615140534/https://docs.bazel.build/versions/master/skylark/language.html |archive-date=15 June 2020 |access-date=25 May 2019 |website=bazel.build}}</ref>"},"influenced by":{"wt":"[[ABC (programming language)|ABC]],<ref name=\"faq-created\" /> [[Ada (programming language)|Ada]],<ref>{{cite web |title=Ada 83 Reference Manual (raise statement) |url=https://archive.adaic.com/standards/83lrm/html/lrm-11-03.html#11.3 |url-status=live |archive-url=https://web.archive.org/web/20191022155758/http://archive.adaic.com/standards/83lrm/html/lrm-11-03.html#11.3 |archive-date=22 October 2019 |access-date=7 January 2020 |website=archive.adaic.com}}</ref>{{failed verification|date=August 2025|reason=The source does not talk about Python. The \"raise\" keyword it describes is very similar to the Python version, but this is original research (see WP:OR).}} {{nowrap|[[ALGOL 68]]}},<ref name=\"98-interview\" /> [[APL (programming language)|APL]],<ref name=\"python.org\">{{cite web |title=itertools – Functions creating iterators for efficient looping |url=https://docs.python.org/3.7/library/itertools.html |url-status=live |archive-url=https://web.archive.org/web/20200614153629/https://docs.python.org/3/library/itertools.html |archive-date=14 June 2020 |access-date=22 November 2016 |website=Python 3.7.17 documentation |quote=This module implements a number of iterator building blocks inspired by constructs from APL, Haskell, and SML.}}</ref> [[C (programming language)|C]],<ref name=\"AutoNT-1\" /> [[C++]],<ref name=\"classmix\" /> [[CLU (programming language)|CLU]],<ref name=\"effbot-call-by-object\" /> [[Dylan (programming language)|Dylan]],<ref name=\"AutoNT-2\" /> [[Haskell]],<ref name=\"AutoNT-3\" /><ref name=\"python.org\" /> [[Icon (programming language)|Icon]],<ref name=\"AutoNT-4\" /> [[Lisp (programming language)|Lisp]],<ref name=\"AutoNT-6\" /> {{nowrap|[[Modula-3]]}},{{r |98-interview}}<ref name=\"classmix\" /> [[Perl]],<ref>{{cite web |title=re – Regular expression operations |url=https://docs.python.org/3.10/library/re.html |url-status=live |archive-url=https://web.archive.org/web/20180718132241/https://docs.python.org/3/library/re.html |archive-date=18 July 2018 |access-date=6 September 2022 |website=Python 3.10.6 documentation |quote=This module provides regular expression matching operations similar to those found in Perl.}}</ref> [[Standard ML]]<ref name=\"python.org\" />"},"influenced":{"wt":"[[Apache Groovy]], [[Boo (programming language)|Boo]], [[Cobra (programming language)|Cobra]], [[CoffeeScript]],<ref>{{Cite web |title=CoffeeScript |url=https://coffeescript.org/ |url-status=live |archive-url=https://web.archive.org/web/20200612100004/http://coffeescript.org/ |archive-date=12 June 2020 |access-date=3 July 2018 |website=coffeescript.org}}</ref> [[D (programming language)|D]], [[F Sharp (programming language)|F#]], [[GDScript]], [[Go (programming language)|Go]], [[JavaScript]],<ref>{{cite web |last=Rauschmayer |first=Axel |date=24 February 2013 |title=Perl and Python influences in JavaScript |url=https://www.2ality.com/2013/02/javascript-influences.html |url-status=live |archive-url=https://web.archive.org/web/20181226141121/http://2ality.com/2013/02/javascript-influences.html%0A |archive-date=26 December 2018 |access-date=15 May 2015 |website=2ality.com}}</ref><ref>{{cite web |last=Rauschmayer |first=Axel |title=Chapter 3: The Nature of JavaScript; Influences |url=https://speakingjs.com/es5/ch03.html |url-status=live |archive-url=https://web.archive.org/web/20181226141123/http://speakingjs.com/es5/ch03.html%0A |archive-date=26 December 2018 |access-date=15 May 2015 |website=Speaking JavaScript |publisher=O'Reilly}}</ref> [[Julia (programming language)|Julia]],<ref name=\"Julia\">{{cite web |last1=Bezanson |first1=Jeff |last2=Karpinski |first2=Stefan |last3=Shah |first3=Viral B. |last4=Edelman |first4=Alan |date=February 2012 |title=Why We Created Julia |url=https://julialang.org/blog/2012/02/why-we-created-julia |url-status=live |archive-url=https://web.archive.org/web/20200502144010/https://julialang.org/blog/2012/02/why-we-created-julia/ |archive-date=2 May 2020 |access-date=5 June 2014 |website=Julia website |quote=We want something as usable for general programming as Python [...]}}</ref> [[Mojo (programming language)|Mojo]],<ref name=\"Mojo\"/> [[Nim (programming language)|Nim]], [[Ruby (programming language)|Ruby]],<ref name=\"bini\" /> [[Swift (programming language)|Swift]],<ref name=\"lattner2014\"/> [[V (programming language)|V]]<ref name=\"vpeople\"/>\n<!-- Do not put in as there's a pure Java implementation (Jython): | programming language = [[C (programming language)|C]] -->"},"wikibooks":{"wt":"Python Programming"}},"i":0}}]}'>
Python
ParadigmMulti-paradigm: object-oriented, procedural (imperative), functional, structured, reflective
Designed byGuido van Rossum
DeveloperPython Software Foundation
First appeared20 February 1991;35 years ago (1991-02-20)

Python is a high-level, general-purpose programming language that emphasizes code readability, simplicity, and ease-of-writing with the use of significant indentation, an extensive ("batteries-included") standard library, and garbage collection. Python supports multiple programming paradigms but with an emphasis on object-oriented programming and dynamic typing.

Guido van Rossum began working on Python in the late 1980s as a successor to the ABC programming language. Python 3.0, released in 2008, was a major revision and not completely backward-compatible with earlier versions. Beginning with Python 3.5, capabilities and keywords for typing were added to the language, allowing optional static typing.


View original on Wikipedia | Back | FazBrowse Home