Skip to content

Commit 81391f4

Browse files
committed
Incorporated Jelle's review feedback
1 parent 978b20d commit 81391f4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/spec/generics.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ Declaration
659659
""""""""""""
660660

661661
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
663663
(for a function, class, or type alias).
664664

665665
.. code-block::
@@ -730,7 +730,7 @@ specification.
730730
.. code-block::
731731
732732
from collections.abc import Callable
733-
from typing import Concatenate, ParamSpec
733+
from typing import Concatenate
734734
735735
class X[T, **P]:
736736
f: Callable[P, int]
@@ -1886,9 +1886,9 @@ literal "``...``" or another in-scope ``ParamSpec`` (see `Scoping Rules`_).
18861886

18871887
class Foo[**P = [str, int]]: ...
18881888

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]
18921892

18931893
``TypeVarTuple`` Defaults
18941894
^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -1901,7 +1901,7 @@ types or an unpacked, in-scope ``TypeVarTuple`` (see `Scoping Rules`_).
19011901

19021902
class Foo[*Ts = *tuple[str, int]]: ...
19031903

1904-
reveal_type(Foo) # type is type[Foo[Ts = *tuple[str, int]]]
1904+
reveal_type(Foo) # type is type[Foo[str, int]]
19051905
reveal_type(Foo()) # type is Foo[str, int]
19061906
reveal_type(Foo[int, bool]()) # type is Foo[int, bool]
19071907

0 commit comments

Comments
 (0)