Kaydet (Commit) 7acc3486 authored tarafından Guido van Rossum's avatar Guido van Rossum

Fix issue #27402: example for typing did not type-check. (Merge 3.5->3.6)

...@@ -427,8 +427,8 @@ The module defines the following classes, functions and decorators: ...@@ -427,8 +427,8 @@ The module defines the following classes, functions and decorators:
def vec2(x: T, y: T) -> List[T]: def vec2(x: T, y: T) -> List[T]:
return [x, y] return [x, y]
def slice__to_4(vector: Sequence[T]) -> List[T]: def keep_positives(vector: Sequence[T]) -> List[T]:
return vector[0:4] return [item for item in vector if item > 0]
.. class:: Set(set, MutableSet[T]) .. 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