Skip to content

Commit ecad802

Browse files
authored
Fix old behaviour in typing documentation (#103400)
1 parent 6d97e52 commit ecad802

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Doc/library/typing.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ to this is that a list of types can be used to substitute a :class:`ParamSpec`::
423423
>>> class Z(Generic[T, P]): ...
424424
...
425425
>>> Z[int, [dict, float]]
426-
__main__.Z[int, (<class 'dict'>, <class 'float'>)]
426+
__main__.Z[int, [dict, float]]
427427

428428

429429
Furthermore, a generic with only one parameter specification variable will accept
@@ -434,9 +434,9 @@ to the former, so the following are equivalent::
434434
>>> class X(Generic[P]): ...
435435
...
436436
>>> X[int, str]
437-
__main__.X[(<class 'int'>, <class 'str'>)]
437+
__main__.X[[int, str]]
438438
>>> X[[int, str]]
439-
__main__.X[(<class 'int'>, <class 'str'>)]
439+
__main__.X[[int, str]]
440440

441441
Do note that generics with :class:`ParamSpec` may not have correct
442442
``__parameters__`` after substitution in some cases because they

0 commit comments

Comments
 (0)