]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] Fix two errors in the typing docs (#105559)
authorAlex Waygood <Alex.Waygood@Gmail.com>
Fri, 9 Jun 2023 13:14:47 +0000 (14:14 +0100)
committerGitHub <noreply@github.com>
Fri, 9 Jun 2023 13:14:47 +0000 (14:14 +0100)
Doc/library/typing.rst

index 485f23e0303b2aa604b141aec224d2ce61e42e2a..34ff058f8930e110ba2f918614cd33b0e60f34c5 100644 (file)
@@ -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::