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
Add deprecation notice to typing.Callable and typing.Type recomme…
…ndations
  • Loading branch information
sterliakov committed Sep 1, 2024
commit 7de2e024bf75fc893015c4d306c35985367e5ba9
4 changes: 2 additions & 2 deletions Doc/library/typing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ Annotating callable objects
===========================

Functions -- or other :term:`callable` objects -- can be annotated using
:class:`collections.abc.Callable` or :data:`typing.Callable`.
:class:`collections.abc.Callable` or deprecated :data:`typing.Callable`.
``Callable[[int], str]`` signifies a function that takes a single parameter
of type :class:`int` and returns a :class:`str`.

Expand Down Expand Up @@ -401,7 +401,7 @@ The type of class objects
=========================

A variable annotated with ``C`` may accept a value of type ``C``. In
contrast, a variable annotated with ``type[C]`` (or
contrast, a variable annotated with ``type[C]`` (or deprecated
:class:`typing.Type[C] <Type>`) may accept values that are classes
themselves -- specifically, it will accept the *class object* of ``C``. For
example::
Expand Down
Loading
0