Python Typing
summary
Updates focus on practicality: modular typeshed unbundles stubs so libraries publish versions on PyPI and type checkers decouple from stub releases; PEP 585 lets built-in collections like dict[list[str]] replace typing.List; PEP 604 adds union with | so str | None replaces Optional[str]; decorator typing via PEP 612 (ParamSpec) exists but mypy lacks implementation; Microsoft’s type guard feature lets user functions narrow types at runtime though it’s not statically verified.
AI-written summary · about
