Skip to content

Commit 2b6faf1

Browse files
authored
Correct typing.Callable docstring
1 parent 8e0dac3 commit 2b6faf1

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

Lib/typing.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2831,15 +2831,15 @@ class Other(Leaf): # Error reported by type checker
28312831
Callable.__doc__ = \
28322832
"""Deprecated alias to collections.abc.Callable.
28332833
2834-
Callable[[int], str] signifies a function that takes a single
2834+
Callable[[int], str] signifies a function that has a single
28352835
parameter of type int and returns a str.
28362836
2837-
The subscription syntax must always be used with exactly two
2838-
values: the argument list and the return type.
2839-
The argument list must be a list of types, a ParamSpec,
2840-
Concatenate or ellipsis. The return type must be a single type.
2837+
The type specification "[]" must have two objects, a parameter
2838+
type list and return type. The parameter type list must be a list
2839+
of types, ParamSpec, Concatenate or ellipsis "...".
2840+
The return type must be a single type.
28412841
2842-
There is no syntax to indicate optional or keyword arguments;
2842+
There is no syntax to indicate optional or keyword parameters;
28432843
such function types are rarely used as callback types.
28442844
"""
28452845
AbstractSet = _alias(collections.abc.Set, 1, name='AbstractSet')

0 commit comments

Comments
 (0)