Skip to content

Commit 89c74e3

Browse files
Add two missing places where type expressions occur (#2110)
This missed some newer syntactic locations that are type expressions.
1 parent 111aece commit 89c74e3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/spec/annotations.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,16 @@ places. Specifically, type expressions are used in the following locations:
7575
* The second argument to :ref:`assert_type() <assert-type>`
7676
* The bounds and constraints of a ``TypeVar`` (whether created through the
7777
old syntax or the native syntax in Python 3.12)
78+
* The default of a ``TypeVar``, ``ParamSpec``, or ``TypeVarTuple`` (whether
79+
created through the old syntax or the native syntax in Python 3.12)
7880
* The definition of a type alias (whether created through the ``type`` statement,
7981
the old assignment syntax, or the ``TypeAliasType`` constructor)
8082
* The type arguments of a generic class (which may appear in a base class
8183
or in a constructor call)
8284
* The definitions of fields in the functional forms for creating
8385
:ref:`TypedDict <typeddict>` and :ref:`NamedTuple <namedtuple>` types
86+
* The value passed to the ``extra_items`` argument in the :ref:`TypedDict <typeddict>`
87+
constructor
8488
* The base type in the definition of a :ref:`NewType <newtype>`
8589

8690
.. _`annotation-expression`:

0 commit comments

Comments
 (0)