CPython Reference Implementation
github.com
3
Leaving SiteNav
External Link Disclaimer
You are about to visit github.com. This website is not operated by us. We are not responsible for its content or privacy practices.
About this website
CPython is the free and open-source reference implementation of the Python programming language, written in C. Originally created by Guido van Rossum in 1989 (first released in 1991 as version 0.9.0), CPython is maintained by the Python Software Foundation and a global community of contributors, with the current version being Python 3.13 (released October 2024). CPython is the most widely used Python implementation, powering the vast majority of Python applications worldwide. Key features: interpreter: CPython is a bytecode interpreter that compiles Python source code (.py files) to bytecode (.pyc files) at runtime, then executes the bytecode on a stack-based virtual machine. The bytecode is version-specific and stored in __pycache__ directories for faster subsequent runs. C API: CPython exposes a C API that allows extension modules to be written in C/C++ for performance-critical operations. This has resulted in a rich ecosystem of C extensions including NumPy, Pandas, SciPy, Pillow, and cryptography. Global Interpreter Lock (GIL): a mutex that allows only one thread to execute Python bytecode at a time, simplifying memory management but limiting true multi-threading. Python 3.13 introduces an experimental no-GIL build (PEP 703). Garbage collection: reference counting for immediate reclamation, supplemented by a generational garbage collector for cyclic references. Standard library: over 200 modules covering I/O, networking, data structures, text processing, internet protocols, cryptography, and more. Import system: modular import system with namespace packages, import hooks, and the ability to import from zip files. AST optimizer and compiler. New features in 3.12+: better error messages, faster CPython (specialization, inline caches), pattern matching (PEP 634), and structural pattern matching. Cross-platform: Linux, macOS, Windows, BSD, and embedded systems. Python Software Foundation License (PSFL, BSD-compatible).
Statistics
3
Views
0
Clicks
0
Like
0
Dislike