Commit 48cfef93 authored by Guido van Rossum's avatar Guido van Rossum

Fix issue #27402: example for typing did not type-check.

parent dae5ee66
......@@ -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])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment