Python, Read From the Source — a reading guide

A phased path through CPython and the standard library: the interpreter's own data structures, three stdlib files read line by line, the evaluation-model gotchas, and the craft of writing Python that reads the same way.

Phase 1 — The runtime, honestly

What the interpreter actually serializes when it runs your code, and how the one structure every object leans on actually works.

Phase 2 — The stdlib, line by line

Three real files, walked start to finish: a condition-variable queue, the linked list under lru_cache, and the dunder protocols the whole language sits on.

Phase 3 — Where Python bites

The evaluation-model rule under the gotchas everyone eventually hits, and the general mechanics of a race once two threads actually share memory.

Phase 4 — Writing it well

From a function a reviewer trusts on sight, to an idiomatic style, to an API whose invariants are load-bearing, to an honest error surface.

Browse the full library