guide 02 / 08
Why Is Python Called CPython? The Name Explained
Why do people call Python 'CPython'? The C stands for the C language the interpreter is written in. Learn the history and why the name matters.
TL;DR
- The "C" in CPython means the interpreter is written in the C programming language.
- The name appeared to tell the original interpreter apart from Jython, PyPy and others.
- Officially, python.org still just calls it "Python".
- CPython has nothing to do with Cython, which is a separate compiler.
01The short answer
Python is called CPython when people want to be precise about which implementation they mean. The C stands for the C programming language, in which the interpreter's core is written: the compiler, the evaluation loop, the object system and most built-in types.
02Where the name came from
Guido van Rossum began Python around 1989 and released it publicly in 1991. For years there was only one Python interpreter, so it didn't need a separate name. That changed when other teams built their own:
- Jython runs Python on the Java Virtual Machine.
- IronPython runs Python on .NET.
- PyPy is Python written in RPython, with a just-in-time compiler.
- MicroPython is a compact Python for microcontrollers.
Once there were several Pythons, developers needed a way to say “the original one written in C.” CPython became the common name.
03Does python.org call it CPython?
Mostly no. Releases are announced as “Python 3.15.2,” not “CPython 3.15.2.” The repository, however, is named python/cpython on GitHub, and the interpreter identifies itself as CPython:
$ python3 -c "import platform; print(platform.python_implementation())"
CPython04How much of CPython is actually C?
The interpreter core and many performance-critical modules are C. A large share of the standard library, such as json, pathlib and asyncio's higher layers, is written in Python itself and lives in the Lib/ directory. Some modules have both: a C accelerator in Modules/ and a pure-Python fallback in Lib/.
| Directory | Mostly | Contains |
|---|---|---|
Python/ | C | Compiler, evaluation loop, runtime |
Objects/ | C | Built-in types like list, dict, int |
Modules/ | C | C extension modules of the stdlib |
Lib/ | Python | The pure-Python standard library |
PCbuild/ | Build files | Windows build scripts and projects |
05Don't confuse it with Cython
The names are one letter apart, which causes endless mix-ups. Cython is a compiler that turns Python-like code (with optional C type declarations) into C extension modules. Those modules are then loaded by CPython. So Cython is a tool you use with CPython. Read the full breakdown in CPython vs Cython.
06Common naming mistakes to avoid
- “CPython is Python written for C programmers.” No. You write normal Python. Only the interpreter itself is in C.
- “CPython compiles Python to C.” No. It compiles to bytecode. Turning Python-like code into C is Cython's job.
- “I need to install CPython in addition to Python.” No. A python.org install already is CPython.
- “CPython is an old version.” No. It is the current, actively developed implementation. Version 3.15.2 was the latest when we checked.
07Why the original was written in C
In the late 1980s, C was the practical choice for a portable language implementation. It ran on almost every operating system, compiled to efficient machine code, and could easily call into existing system libraries. Those same reasons still matter today. Because CPython is in C, it can talk directly to C libraries, which is exactly what the C API and the huge ecosystem of extension modules depend on.
The choice also explains some of CPython's character. Its objects are C structs, its memory is managed with reference counts in C, and its performance work focuses on making the C evaluation loop faster.
08Why the name still matters
The distinction comes up when you read about the GIL, C extensions, memory use or performance. These are properties of CPython, and they may differ on PyPy or GraalPy. Knowing which implementation you're on helps you understand bug reports, benchmarks and documentation notes that say “CPython implementation detail.”
??Quick questions
Q01What does the C in CPython stand for?
The C programming language, in which the core interpreter is written.
Q02Is CPython written entirely in C?
No. The core is C, but a large part of the standard library is written in Python.