Python, CPython and Cython: What is what ?

Zaid Afzal ⚡️
2 min readAug 6, 2022

--

Python is a programming language, while CPython is an implementation of the Python programming language.

By Jeremiah Lawrence on Unsplash

Python

In reality, Python is a specification for a programming language which can be implemented in many different ways and is independent from underlying high level language.

Most popular implementation till now is CPython which we’ll discuss next.

The complete design specification document for latest Python 3.x is useful for deeper understanding.

CPython

This is the original and well maintained implementation of Python specification. When we download Python programming language from official website, we get CPython.

It compiles Python code (written in .py file) to intermediate bytecode which is then interpreted by CPython’s virtual machine software.

You can contribute to open source CPython code on Github.

Cython

Cython is more like of new language which is superset of Python and C programming languages. You can call C function and declare C variables within Python code.

Because of this method, its execution is very fast when compared to default Python (CPython) since C code is not interpreted but compiled.

Apart of these, there are some other Python implementation in the market as well which may have some differences from original Python standards as documented. These might also have additional content which is not covered in standard Python documentation.

These implementations include:

Feedback

You can write your suggestions & feedback in comment section, but I would love to hear more from you if you can give me anonymous feedback at zaidafzal.com/feedback

--

--