← Home

Compression Mode

New

If you only had a few KB of memory to remember a whole topic, what would you keep? The anchors. Everything else re-derives from these. Pick a topic, pick a budget, see what survives.

Memory budget

Python

Just the anchors — everything else re-derives from these.

2.20 KB
2,257 bytes
What it is

Python is a high-level, interpreted language with dynamic typing, automatic memory management (reference counting + GC), and a design philosophy centered on readability. CPython is the reference implementation — everything runs through its bytecode VM.

Seeds · 9 critical
1.66 KB
GIL (Global Interpreter Lock)GIL = Giant Invisible Leash. Imagine all your threads are dogs on one leash — only one can run ahead at a time. But when a dog stops to sniff (I/O), the leash lets the next dog go.
Reference Countingref-COUNT = a library book's checkout card. Each borrower adds a tally. The book goes back on the shelf (freed) only when the last borrower returns it — zero tallies left.
DecoratorsDecorators = gift wrapping. @decorator wraps your function in fancy paper at definition time. Stacked decorators? The bottom wrapper goes on first, then the outer one wraps around it — like nesting dolls.
Generators & yieldA generator is a lazy vending machine — it only makes the next snack when you press the button (next()). It remembers which slot it's on, and once it's empty, it's done forever. No refills.
Coroutines & async/awaitasync/await = a chef juggling multiple dishes. 'await' means 'this is in the oven, let me chop veggies for another dish.' But if you stand and watch the oven (blocking call), every other dish burns.
Dunder Methods (Python Data Model)Dunder methods = secret handshakes. When Python sees 'len(x)', it whispers '__len__?' to your object. If your object knows the handshake, it responds. Double underscores = double secret.
Method Resolution Order (MRO)MRO = the seating chart at a family dinner. With multiple inheritance, Python uses C3 rules to decide who sits where — no one sits twice, and left-side family always comes before right-side.
asyncio & Event Loopasyncio = an air traffic controller on a single runway. Planes (coroutines) take off and land cooperatively. One plane hogging the runway (blocking call) means every other plane circles forever.
dict InternalsA dict is a coat check room. You hand over your hashable ticket (key), and they instantly find your coat (value). Since Python 3.7, coats hang in the order they arrived.
Top traps · 3
  • Mutable default arguments (def f(x=[])) are evaluated ONCE at definition — all calls share the same list.
  • GIL doesn't make compound operations atomic — i += 1 is LOAD + ADD + STORE, a race condition between threads.
  • Generators are exhausted after one iteration — list(gen) a second time returns [].
What you lose11 high-importance concepts20 interview-ready answers · re-derive from the anchors above.

Share your compressed seed

Export as a 1200×630 image — the kind of thing people save and share.