Python Internals
CPython execution, bytecode, frames, the object model, reference counting, garbage collection, interning and the GIL.
Lessons in this build
Dict & Set Internals
CPython's dict is a compact, insertion-ordered open-addressing hash table giving average O(1) lookup — and set is the very same machinery with the values removed.
interactive visualizerReference Counting & Garbage Collection
CPython frees most objects the instant their last reference goes away via reference counting, and a generational cyclic garbage collector mops up the reference cycles that counting alone can never reclaim.
interactive visualizerThe Global Interpreter Lock (GIL)
The GIL is a mutex in CPython that lets only one thread execute Python bytecode at a time — the single most misunderstood part of Python concurrency.
interactive visualizerWhy it matters
Interview importance 5/5 · production importance 4/5.
Recommended next
The Global Interpreter Lock (GIL)