Developer(s) | Python core developers and the Python community, supported by the Python Software Foundation |
---|---|
Stable release |
3.6.1 / 21 March 2017
2.7.13 / 17 December 2016 |
Repository | github |
Written in | C |
Platform | 42 platforms; see § Distribution |
Type | Python Programming Language Interpreter |
License | Python Software Foundation License |
Website | python |
CPython is the reference implementation of the Python programming language. Written in C, CPython is the default and most widely used implementation of the language.
CPython is an interpreter. It has a foreign function interface with several languages including C, in which one must explicitly write bindings in a language other than Python.
A significant limitation of CPython is the use of a global interpreter lock (GIL) on each CPython interpreter process, which effectively disables concurrent Python threads within one process. Concurrency can only be achieved with separate CPython interpreter processes managed by a multitasking operating system. This complicates communication between concurrent Python processes, though the multiprocessing module mitigates this somewhat. Much discussion took place on whether to remove the GIL from CPython. A set of "free threading" patches to CPython was submitted by Greg Stein, which effectively replaced GIL with fine-grained locking. However the patches were rejected due to the execution overhead they introduced into single-process code.
Supported platforms include:
PEP 11 lists platforms which are not supported in CPython by Python Software Foundation. These platforms can still be supported by external ports. These ports include:
External ports not integrated to Python Software Foundation's official version of CPython, with links to its main development site, often include additional modules for platform-specific functionalities, like graphics and sound API for PSP and SMS and camera API for S60. These ports include: