Skip to content
Merged
Show file tree
Hide file tree
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
Finish addressing review
  • Loading branch information
AlexWaygood committed Jun 7, 2023
commit 1122321451d9e631808366dbf662cb07730c65aa
3 changes: 2 additions & 1 deletion Doc/library/typing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,8 @@ These can be used as types in annotations using ``[]``, each having a unique syn

Deprecated alias to :class:`collections.abc.Callable`.

``Callable[[int], str]`` signifies a function of (int) -> str.
``Callable[[int], str]`` signifies a function that takes a single parameter
of type :class:`int` and returns a :class:`str`.

The subscription syntax must always be used with exactly two
values: the argument list and the return type. The argument list
Expand Down
4 changes: 3 additions & 1 deletion Lib/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -2554,7 +2554,9 @@ class Other(Leaf): # Error reported by type checker
Callable.__doc__ = \
"""Deprecated alias to collections.abc.Callable.

Callable[[int], str] signifies a function of (int) -> str.
Callable[[int], str] signifies a function that takes a single
parameter of type int and returns a str.

The subscription syntax must always be used with exactly two
values: the argument list and the return type.
The argument list must be a list of types, a ParamSpec,
Expand Down