mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 06:39:38 +07:00
PY-21244 Fix type annotations for the built-in function "map"
This commit is contained in:
@@ -202,9 +202,9 @@ def map(function, sequence, *sequence_1):
|
||||
"""Return a list of the results of applying the function to the items of
|
||||
the argument sequence(s).
|
||||
|
||||
:type function: ((T) -> V) | None
|
||||
:type function: None | (T) -> V
|
||||
:type sequence: collections.Iterable[T]
|
||||
:rtype: list[V] | bytes | unicode
|
||||
:rtype: list[V]
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
@@ -195,16 +195,28 @@ def max(*args, key=None, default=None):
|
||||
pass
|
||||
|
||||
|
||||
def map(function, sequence, *sequence_1):
|
||||
"""Return a list of the results of applying the function to the items of
|
||||
the argument sequence(s).
|
||||
class map(object):
|
||||
def __init__(self, function, sequence, *sequence_1):
|
||||
"""Return an iterable of the results of applying the function to the items of
|
||||
the argument sequence(s).
|
||||
|
||||
:type function: ((T) -> V) | None
|
||||
:type sequence: collections.Iterable[T]
|
||||
:rtype: list[V] | bytes | str
|
||||
"""
|
||||
pass
|
||||
:type function: None | (T) -> V
|
||||
:type sequence: collections.Iterable[T]
|
||||
:rtype: map[T, V]
|
||||
"""
|
||||
pass
|
||||
|
||||
def __iter__(self):
|
||||
"""
|
||||
:rtype: collections.Iterator[V]
|
||||
"""
|
||||
return self
|
||||
|
||||
def __next__(self):
|
||||
"""
|
||||
:rtype: V
|
||||
"""
|
||||
pass
|
||||
|
||||
def min(*args, key=None, default=None):
|
||||
"""Return the smallest item in an iterable or the smallest of two or more
|
||||
|
||||
Reference in New Issue
Block a user