Understanding Python from the inside: C concepts to dive into CPython fearless
summary
Shows that CPython is ~35.8% C and walks through compiled binaries to find main -> pybytes_main -> pymain, then inspects PyObject/PyTypeObject structs to explain how types and pointers map to fields. Covers C basics (pointers, malloc/free), refcount lifecycle, and C API calls like PyUnicode_FromString, PyList_Append and PyArg_ParseTupleAndKeywords. Demonstrates building a minimal C extension module, using a binary inspector (GDV) and publishes code/examples in the repo for hands‑on reproduction.
AI-written summary · about
chapters (7)
- 0:00Introduction and motivation
- 4:00Programming languages and C
- 12:05Exploring CPython internals
- 16:01Python objects in C
- 20:33C API and real-world use
- 24:04Python extensions in C
- 27:02Q&A and closing
related talks
22mLow Level Python a Deep dive into the python sources
02h 26mPointers in Python
50mExploring CPython's bytecode
31mPlaying with CPython Objects Internals
25mHow to bring your C++ project to Python land
30mA Bit about Bytes: Understanding Python Bytecode
01h 21mExploring Python Code Objects
30mDemystifying Python’s Internals: Diving into CPython by implementing...
