◐ Shell
clean mode source ↗

[3.11] gh-103921: Improve typing documentation (GH-104642) by JelleZijlstra · Pull Request #105007 · python/cpython

(cherry picked from commit 060277d)

This backports some of the changes from the PEP 695 documentation PR (#104642) to 3.11, because I ended up making some improvements that are also applicable to older versions of typing:

  • Consistent indentation of examples in typing.rst
  • Document the call signature of TypeVar, ParamSpec, TypeVarTuple
  • Omit mention of the variance-related parameters of ParamSpec, which are not meaningful in the type system
  • Some wording improvements

📚 Documentation preview 📚: https://cpython-previews--105007.org.readthedocs.build/