mirror of
https://github.com/python/cpython.git
synced 2026-04-22 03:41:08 +00:00
Fix typo in TypeVar docstring (GH-8142)
"can be used do declare" → "can be used to declare"
(cherry picked from commit 86bfed372b)
Co-authored-by: João D. Ferreira <jotomicron@gmail.com>
This commit is contained in:
parent
8e4c8513f7
commit
e019f98dc2
1 changed files with 1 additions and 1 deletions
|
|
@ -509,7 +509,7 @@ def longest(x: A, y: A) -> A:
|
|||
At runtime, isinstance(x, T) and issubclass(C, T) will raise TypeError.
|
||||
|
||||
Type variables defined with covariant=True or contravariant=True
|
||||
can be used do declare covariant or contravariant generic types.
|
||||
can be used to declare covariant or contravariant generic types.
|
||||
See PEP 484 for more details. By default generic types are invariant
|
||||
in all type variables.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue