From a3bcb01e199d146e661d8d1636fbc58739d45b8d Mon Sep 17 00:00:00 2001 From: AlexWaygood Date: Fri, 9 Jun 2023 13:54:04 +0100 Subject: [PATCH] [3.11] Fix two errors in the typing docs --- Doc/library/typing.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index 485f23e0303b2a..34ff058f8930e1 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -1232,7 +1232,7 @@ These can be used as types in annotations using ``[]``, each having a unique syn * ``Annotated`` cannot be used with an unpacked :class:`TypeVarTuple`:: - type Variadic[*Ts] = Annotated[*Ts, Ann1] # NOT valid + Variadic: TypeAlias = Annotated[*Ts, Ann1] # NOT valid This would be equivalent to:: @@ -2011,7 +2011,7 @@ These are not used in annotations. They are building blocks for declaring types. T = TypeVar('T') class XT(X, Generic[T]): pass # raises TypeError - A ``TypedDict`` can be generic:: + A ``TypedDict`` can be generic: .. testcode::