◐ Shell
clean mode source ↗

gh-123523: Rework typing documentation for generators and coroutines, and link to it from `collections.abc` docs by sterliakov · Pull Request #123544 · python/cpython

Fixes #123523.

Aliases from typing to collections.abc and contextlib modules are deprecated for a long time, and typing-related documentation should be easily reachable from the modern pages.

This PR moves all non-trivial descriptions between these pages and lists generic arguments for these aliases.

I'm using PEP695 syntax for these classes - it doesn't seem right to document them as inheriting from Generic, since they do not in fact (they define __class_getitem__ directly).


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