Commit 8c7da550 authored by Stefan Behnel's avatar Stefan Behnel

improve comments

parent cd73a4ab
...@@ -1503,13 +1503,13 @@ class EarlyReplaceBuiltinCalls(Visitor.EnvTransform): ...@@ -1503,13 +1503,13 @@ class EarlyReplaceBuiltinCalls(Visitor.EnvTransform):
def _handle_simple_function_all(self, node, pos_args): def _handle_simple_function_all(self, node, pos_args):
"""Transform """Transform
_result = all(x for L in LL for x in L) _result = all(p(x) for L in LL for x in L)
into into
for L in LL: for L in LL:
for x in L: for x in L:
if not x: if not p(x):
_result = False _result = False
break break
else: else:
...@@ -1523,13 +1523,13 @@ class EarlyReplaceBuiltinCalls(Visitor.EnvTransform): ...@@ -1523,13 +1523,13 @@ class EarlyReplaceBuiltinCalls(Visitor.EnvTransform):
def _handle_simple_function_any(self, node, pos_args): def _handle_simple_function_any(self, node, pos_args):
"""Transform """Transform
_result = any(x for L in LL for x in L) _result = any(p(x) for L in LL for x in L)
into into
for L in LL: for L in LL:
for x in L: for x in L:
if x: if p(x):
_result = True _result = True
break break
else: else:
......
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