Month 2 - Intermediate Idioms: Decorators, Context Managers, Dataclasses, Typing¶
Goal: by the end of week 8 you can (a) write decorators that preserve type signatures and stack cleanly with functools.wraps and ParamSpec, (b) build correct context managers (sync and async) and reason about their teardown order, (c) model domain objects with dataclasses and pydantic knowing when each is appropriate, and (d) write pyright --strict-clean code using Protocol, generics, TypedDict, Literal, overload, and TypeGuard.
Weeks¶
- Week 5 - Object Model Deep Dive: Classes, Descriptors, Metaclasses
- Week 6 - Decorators,
functools, andcontextlib - Week 7 - Dataclasses,
attrs, Pydantic, and the Validation Boundary - Week 8 - The Type System: Generics, Protocols, Variance, and
typing.*