Bytecode and the Compiler
How Python source becomes bytecode, the dis module, .pyc files, peephole optimisation, and writing a bytecode-level function.
How Python source becomes bytecode, the dis module, .pyc files, peephole optimisation, and writing a bytecode-level function.
The CPython source tree, the main evaluation loop, and how Python executes a .py file from disk to output.
Free-threaded Python, the specialising adaptive interpreter, immortal objects, sub-interpreters, and what changed in the 3.10–3.13 internals.
CPython's memory allocator layers, the pymalloc arena system, reference counting, cyclic GC generations, and how memory is actually freed.
PyObject layout, type objects, reference counting, small integer cache, string interning, and the cost of Python's dynamic type system.
What the GIL is, why it exists, how it works in CPython 3.12+, its performance impact, and the Python 3.13 free-threaded mode.
The Python C API, writing and building a C extension module, PyArg_ParseTuple, error handling, reference counting in C, and CFFI/ctypes alternatives.