Commit 284c69f0 authored by Guido Trotter's avatar Guido Trotter

Revert "Only override any and all if not defined"

This reverts commit bd561702.

Turns out our and python's any/all are not compatible.
Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 0a37de5f
......@@ -1477,24 +1477,18 @@ def FirstFree(seq, base=0):
return None
try:
all = all # pylint: disable-msg=W0622
except NameError:
def all(seq, pred=bool): # pylint: disable-msg=W0622
"Returns True if pred(x) is True for every element in the iterable"
for _ in itertools.ifilterfalse(pred, seq):
return False
return True
def all(seq, pred=bool): # pylint: disable-msg=W0622
"Returns True if pred(x) is True for every element in the iterable"
for _ in itertools.ifilterfalse(pred, seq):
return False
return True
try:
any = any # pylint: disable-msg=W0622
except NameError:
def any(seq, pred=bool): # pylint: disable-msg=W0622
"Returns True if pred(x) is True for at least one element in the iterable"
for _ in itertools.ifilter(pred, seq):
return True
return False
def any(seq, pred=bool): # pylint: disable-msg=W0622
"Returns True if pred(x) is True for at least one element in the iterable"
for _ in itertools.ifilter(pred, seq):
return True
return False
def SingleWaitForFdCondition(fdobj, event, timeout):
......
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