◐ Shell
reader mode source ↗
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
12 changes: 11 additions & 1 deletion Lib/_collections_abc.py
Original file line number Diff line number Diff line change
@@ -434,7 +434,7 @@ def __create_ga(cls, origin, args):
raise TypeError(
"Callable must be used as Callable[[arg, ...], result].")
t_args, t_result = args
if isinstance(t_args, list):
ga_args = tuple(t_args) + (t_result,)
# This relaxes what t_args can be on purpose to allow things like
# PEP 612 ParamSpec. Responsibility for whether a user is using
Expand All @@ -456,6 +456,16 @@ def __reduce__(self):
args = list(args[:-1]), args[-1]
return _CallableGenericAlias, (Callable, args)


def _type_repr(obj):
"""Return the repr() of an object, special-casing types (internal helper).
Expand Down
Toggle all file notes Toggle all file annotations