mirror of https://github.com/python/cpython
Fix issue #27402: example for typing did not type-check. (Merge 3.5->3.6)
This commit is contained in:
commit
7acc3486d6
|
@ -427,8 +427,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…
Reference in New Issue