mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
[3.11] Fix two errors in the typing docs (#105559)
This commit is contained in:
parent
fed1b5a198
commit
faf15fda28
1 changed files with 2 additions and 2 deletions
|
@ -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::
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue