Python from First PrinciplesPost 20 of 20 · 20 of 20 written

20. Glossary and resources

Python · 20 of 203 min readOct 2026

These are the terms to use when you search or ask for help; the right word usually finds the right answer.

Term Meaning Part
AST the parsed tree structure of source code 1
Autograd PyTorch’s system that records operations and computes gradients 15
Backoff waiting progressively longer between retries 8, 16
Broadcasting combining arrays of different shapes by virtually stretching size-1 axes 13
Bytecode the instructions CPython compiles source code into 1
Closure a function that keeps variables from the scope where it was defined 5
Collate combining individual examples into one batch 15
Coroutine a function defined with async def that can pause at await 12
CPython the reference Python implementation, written in C 1
Decorator a function that wraps or replaces another function 5
Descriptor an object with __get__ that controls attribute access 7
Dunder method a special method such as __len__ that syntax calls 7
Eval a test set that scores probabilistic model behavior 17
Event loop the scheduler that runs coroutines in asyncio 12
Generator a function with yield that produces values lazily 6
GIL the lock that lets one thread run Python bytecode at a time 12
Hashable usable as a dict key: has a stable hash consistent with equality 3
Idempotent safe to repeat with the same effect 16
Iterable / iterator something you can loop over / the one-shot object doing the looping 6
JSON Schema a JSON description of data shape, used for tools and structured output 10, 16
Leaf tensor a tensor created directly (like a parameter) whose .grad is filled 15
MRO method resolution order: the class lookup chain 7
Mutable its value can change in place 2
Reference count the number of references to an object; at zero it is freed 2
SSE server-sent events, the HTTP streaming format most LLM APIs use 6, 16
state_dict a model’s parameters and buffers as a name-to-tensor dict 15
Stride bytes to step in memory to move one position along an axis 13
ufunc a NumPy function applied elementwise in compiled code 13
View an array sharing memory with another array 13
Virtual environment an isolated interpreter plus its own installed packages 9
Wheel a prebuilt package file, often containing compiled code 9

Resources, in the order this guide uses them

  • Python documentation: the official tutorial, then the “Data model” chapter of the Language Reference. That one chapter underlies Parts 2 to 7.
  • Ned Batchelder, “Facts and Myths about Python names and values” (PyCon talk): Part 2 in about half an hour.
  • Luciano Ramalho, Fluent Python: the best book-length treatment of Parts 2 to 8 and 12.
  • Brett Slatkin, Effective Python: short, practical items on idiomatic code.
  • David Beazley’s talks on generators and concurrency: the clearest explanations of Parts 6 and 12.
  • Jake VanderPlas, Python Data Science Handbook, and Nicolas Rougier, From Python to NumPy: Parts 13 and 14.
  • Andrej Karpathy, “Neural Networks: Zero to Hero”: micrograd, makemore, nanoGPT and a tokenizer build; the backbone of Part 19, phase 5.
  • PyTorch official tutorials and the “Autograd mechanics” notes: Part 15.
  • FastAPI, Pydantic and your LLM provider’s official docs: Parts 10 and 16. Prefer them over blog posts, because these APIs change quickly.
  • Hugging Face course: transformers, tokenizers and datasets in practice.