β All terms Β· Standard library
functools.cache
Memoize a pure function with `@functools.cache`. Replaces hand-rolled dict caching.
Learn this interactively:
Open lesson lesson-131 βRelated β Standard library
pathlib.PathObject-oriented filesystem paths. `Path(".").rglob("*.py")` beats `os.walk + os.β¦collections.CounterDict subclass that counts hashable items: `Counter("hello")` β `{'l': 2, ...}`.itertoolsIterator building blocks β `chain`, `groupby`, `combinations`, `accumulate`. Lazβ¦dataclasses.fieldConfigure a dataclass attribute β mutable defaults, init/repr behavior. Use `fieβ¦