//
Search across all documentation pages
11 pages in this section.
Why for, with, and @decorator all reduce to the same idea - objects that implement a protocol, and closures that carry state between calls - the mental model behind every page in this section.
`__iter__`/`__next__`, `iter()`, and building custom iterables.
Lazy sequences, generator state, and memory-efficient pipelines.
`chain`, `groupby`, `islice`, `product`, and infinite iterators.
`lru_cache`, `partial`, `reduce`, `singledispatch`, `wraps`.
Free variables, late binding, and factory functions.
Composability and readability guidance.