From faf15fda283cd850bd2c324dd23cf98488793cac Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Fri, 9 Jun 2023 14:14:47 +0100 Subject: [3.11] Fix two errors in the typing docs (#105559) --- 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 485f23e..34ff058 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:: -- cgit v0.12