File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -423,7 +423,7 @@ to this is that a list of types can be used to substitute a :class:`ParamSpec`::
423
423
>>> class Z(Generic[T, P]): ...
424
424
...
425
425
>>> Z[int, [dict, float]]
426
- __main__.Z[int, (<class ' dict'>, <class ' float'>) ]
426
+ __main__.Z[int, [ dict, float] ]
427
427
428
428
429
429
Furthermore, a generic with only one parameter specification variable will accept
@@ -434,9 +434,9 @@ to the former, so the following are equivalent::
434
434
>>> class X(Generic[P]): ...
435
435
...
436
436
>>> X[int, str]
437
- __main__.X[(<class ' int'>, <class ' str'>) ]
437
+ __main__.X[[ int, str] ]
438
438
>>> X[[int, str]]
439
- __main__.X[(<class ' int'>, <class ' str'>) ]
439
+ __main__.X[[ int, str] ]
440
440
441
441
Do note that generics with :class: `ParamSpec ` may not have correct
442
442
``__parameters__ `` after substitution in some cases because they
You can’t perform that action at this time.
0 commit comments