Commit 3b887359 authored by Christoph Lienhard's avatar Christoph Lienhard

slightly faster any() and all() in MultiFields

also much more pythonic and horrible for people with origins in other languages
parent 7fdbe2c2
Pipeline #36365 passed with stages
in 1 minute and 24 seconds
......@@ -161,16 +161,16 @@ class MultiField(object):
return True
def any(self):
result = False
for field in self._val.values():
result = result or field.any()
return result
if field.any():
return True
return False
def all(self):
result = True
for field in self._val.values():
result = result and field.all()
return result
if not field.all():
return False
return True
for op in ["__add__", "__radd__", "__iadd__",
"__sub__", "__rsub__", "__isub__",
......
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