Skip to content

Commit faf15fd

Browse files
authored
[3.11] Fix two errors in the typing docs (#105559)
1 parent fed1b5a commit faf15fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/library/typing.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,7 +1232,7 @@ These can be used as types in annotations using ``[]``, each having a unique syn
12321232

12331233
* ``Annotated`` cannot be used with an unpacked :class:`TypeVarTuple`::
12341234

1235-
type Variadic[*Ts] = Annotated[*Ts, Ann1] # NOT valid
1235+
Variadic: TypeAlias = Annotated[*Ts, Ann1] # NOT valid
12361236

12371237
This would be equivalent to::
12381238

@@ -2011,7 +2011,7 @@ These are not used in annotations. They are building blocks for declaring types.
20112011
T = TypeVar('T')
20122012
class XT(X, Generic[T]): pass # raises TypeError
20132013

2014-
A ``TypedDict`` can be generic::
2014+
A ``TypedDict`` can be generic:
20152015

20162016
.. testcode::
20172017

0 commit comments

Comments
 (0)