mirror of
https://github.com/python/cpython
synced 2026-09-29 11:15:30 +03:00
Fix issue #27402: example for typing did not type-check.
This commit is contained in:
parent
63bf487688
commit
457509826e
1 changed files with 2 additions and 2 deletions
|
|
@ -428,8 +428,8 @@ The module defines the following classes, functions and decorators:
|
|||
def vec2(x: T, y: T) -> List[T]:
|
||||
return [x, y]
|
||||
|
||||
def slice__to_4(vector: Sequence[T]) -> List[T]:
|
||||
return vector[0:4]
|
||||
def keep_positives(vector: Sequence[T]) -> List[T]:
|
||||
return [item for item in vector if item > 0]
|
||||
|
||||
.. class:: Set(set, MutableSet[T])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue