What is Python written in?

Python's reference implementation, CPython, is written primarily in C. The language specification itself is implementation-independent, but CPython is the dominant runtime and is implemented in C for performance and portability. Other implementations include Jython (Java), PyPy (Python/RPython), and IronPython (.NET).

Details

When people ask "what is Python written in?" they usually mean CPython, the reference implementation maintained by the Python Software Foundation. CPython's interpreter core and standard library are written in C, with some modules written in Python itself.

Python as a language specification is separate from any particular implementation. The specification doesn't mandate that Python must be implemented in C — but CPython happens to be the most widely deployed runtime.

The dataset records a runtime_written_in relationship from C to Python, indicating that Python's primary runtime is implemented in C.

Explore in the Graph

See implementation and influence relationships interactively.

Open Interactive Graph →

Related Pages