8000 gh-123523: Rework typing documentation for generators and coroutines, and link to it from `collections.abc` docs by sterliakov · Pull Request #123544 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-123523: Rework typing documentation for generators and coroutines, and link to it from collections.abc docs #123544

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Sep 6, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
s/Refer to/See
  • Loading branch information
sterliakov committed Sep 3, 2024
commit 24ff30e86f4591a4c2000e45a50f14acc2729088
6 changes: 3 additions & 3 deletions Doc/library/collections.abc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ Collections Abstract Base Classes -- Detailed Descriptions
:meth:`~generator.send`,
:meth:`~generator.throw` and :meth:`~generator.close` methods.

Refer to :ref:`annotating-generators-and-coroutines`
See :ref:`annotating-generators-and-coroutines`
for details on using :class:`!Generator` in type annotations.

.. versionadded:: 3.5
Expand Down Expand Up @@ -327,7 +327,7 @@ Collections Abstract Base Classes -- Detailed Descriptions
Using ``isinstance(gencoro, Coroutine)`` for them will return ``False``.
Use :func:`inspect.isawaitable` to detect them.

Refer to :ref:`annotating-generators-and-coroutines`
See :ref:`annotating-generators-and-coroutines`
for details on using :class:`!Coroutine` in type annotations.
The variance and order of type parameters correspond to those of
:class:`Generator`.
Expand All @@ -353,7 +353,7 @@ Collections Abstract Base Classes -- Detailed Descriptions
ABC for :term:`asynchronous generator` classes that implement the protocol
defined in :pep:`525` and :pep:`492`.

Refer to :ref:`annotating-generators-and-coroutines`
See :ref:`annotating-generators-and-coroutines`
for details on using :class:`!AsyncGenerator` in type annotations.

.. versionadded:: 3.6
Expand Down
Loading
0