From: Alex Waygood Date: Fri, 9 Jun 2023 13:14:47 +0000 (+0100) Subject: [3.11] Fix two errors in the typing docs (#105559) X-Git-Tag: v3.11.5~306 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=faf15fda283cd850bd2c324dd23cf98488793cac;p=thirdparty%2FPython%2Fcpython.git [3.11] Fix two errors in the typing docs (#105559) --- diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index 485f23e0303b..34ff058f8930 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::