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
Use double backticks
  • Loading branch information
sterliakov committed Sep 1, 2024
commit e7bd7b718bd7e170408c09846571b5aae2f0fc16
4 changes: 2 additions & 2 deletions Doc/library/typing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -485,9 +485,9 @@ or :class:`Iterator[YieldType] <collections.abc.Iterator>`::
start += 1

Async generators are handled in a similar fashion, but don't
expect a `ReturnType` type argument
expect a ``ReturnType`` type argument
(:class:`AsyncGenerator[YieldType, SendType] <collections.abc.AsyncGenerator>`).
The `SendType` argument defaults to :const:`!None`, so the following definitions
The ``SendType`` argument defaults to :const:`!None`, so the following definitions
are equivalent::

async def infinite_stream(start: int) -> AsyncGenerator[int]:
Expand Down
Loading
0