cpython
4 free lessons tagged cpython across Programming. Each one is a short sequence of focused steps with narration and a five-question quiz at the end — take them in any order, no signup required.
CPython: the GIL and free-threading
Why CPython has a Global Interpreter Lock, what it does and does not protect, and how the three concurrency models differ. Then how PEP 703 free-threading removes the GIL using per-object locks and biased, deferred, and immortal reference counting, plus the tradeoffs that keep it opt-in.
CPython: reference counting and the cyclic GC
How CPython reclaims memory: immediate reference counting for the common case, plus a generational cyclic garbage collector that catches the reference cycles counting cannot. Covers what changes a refcount, generations and thresholds, the gc module, __del__ and weakref, and why a process's memory does not always shrink.
CPython: bytecode and the interpreter loop
What actually runs when you run Python: the compiler turns source into a code object of bytecode, and a single C evaluation loop executes it on a stack machine, one frame per call. Covers code objects, the dis module, the value stack, frames, and the adaptive specializing interpreter.
CPython: the object and data model
How Python values really work under the hood: every value is a heap object with a type and a reference count, names are references not boxes, and behavior comes from the data model's dunder methods. Covers identity versus equality, attribute lookup order, descriptors, and __slots__.

