Last Updated: May 22, 2026
Functions in Python are first-class values. They can be passed as arguments, stored in dicts, and returned from other functions. The typing module's Callable describes the shape of a function-typed value so a type checker can verify what gets called and what comes back. This lesson covers every flavor of Callable, the ParamSpec machinery that makes decorators type-safe, and the Protocol alternative for callables with structure beyond a simple signature.