@@ -659,7 +659,7 @@ Declaration
659
659
""""""""""""
660
660
661
661
In Python 3.12 and newer, a parameter specification variable can be introduced
662
- inline by prefixing its name with ``** `` inside a generic parameter list
662
+ inline by prefixing its name with ``** `` inside a type parameter list
663
663
(for a function, class, or type alias).
664
664
665
665
.. code-block ::
@@ -730,7 +730,7 @@ specification.
730
730
.. code-block ::
731
731
732
732
from collections.abc import Callable
733
- from typing import Concatenate, ParamSpec
733
+ from typing import Concatenate
734
734
735
735
class X[T, **P]:
736
736
f: Callable[P, int]
@@ -1886,9 +1886,9 @@ literal "``...``" or another in-scope ``ParamSpec`` (see `Scoping Rules`_).
1886
1886
1887
1887
class Foo[**P = [str, int]]: ...
1888
1888
1889
- reveal_type(Foo) # type is type[Foo[P = [ str, int] ]]
1890
- reveal_type(Foo()) # type is Foo[[ str, int] ]
1891
- reveal_type(Foo[[bool, bool]]()) # type is Foo[[ bool, bool] ]
1889
+ reveal_type(Foo) # type is type[Foo[str, int]]
1890
+ reveal_type(Foo()) # type is Foo[str, int]
1891
+ reveal_type(Foo[[bool, bool]]()) # type is Foo[bool, bool]
1892
1892
1893
1893
``TypeVarTuple `` Defaults
1894
1894
^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -1901,7 +1901,7 @@ types or an unpacked, in-scope ``TypeVarTuple`` (see `Scoping Rules`_).
1901
1901
1902
1902
class Foo[*Ts = *tuple[str, int]]: ...
1903
1903
1904
- reveal_type(Foo) # type is type[Foo[Ts = *tuple[ str, int] ]]
1904
+ reveal_type(Foo) # type is type[Foo[str, int]]
1905
1905
reveal_type(Foo()) # type is Foo[str, int]
1906
1906
reveal_type(Foo[int, bool]()) # type is Foo[int, bool]
1907
1907
0 commit comments