Tutorial sequence
From Source Code to Running Frame
- 01Read
advanced / 31 min
What compile() actually produces
Follow Python source through ASTs and code objects, then watch execution supply the frame and namespaces that compiled code does not contain.
- 02Read
advanced / 31 min
Reading bytecode without cargo culting it
Use disassembly as versioned evidence, connect stack operations to source semantics, and avoid turning CPython opcodes into false contracts.
- 03Read
advanced / 32 min
Frames, locals, globals, and builtins
Trace Python name resolution through live frames, fast locals, module globals, builtins, and the namespace rules around exec.
- 04Read
advanced / 30 min
Closures capture cells, not frozen values
Understand late binding, shared nonlocal state, loop callbacks, and the CPython cells underneath lexical closures.
- 05Read
advanced / 31 min
Function calls and vectorcall
Separate Python call semantics from CPython vectorcall, then design APIs that avoid needless argument and boundary overhead.
- 06Read
advanced / 33 min
Exceptions are control flow with machinery
Follow exceptions through matching, unwinding, chaining, cleanup, exception groups, and CPython 3.14 exception tables.