Cleanup the mess of comprehensions at least a bit
This commit is contained in:
1 parent
39eefdbc00
commit
ed93bbfb68
2 files changed
+46
-48
No files matched your search
@@ -233,8 +233,12 @@ class TreeArguments(AbstractArguments):
|
||||
named_args.append((c[0].value, LazyTreeContext(self.context, c[2]),))
|
||||
else: # Generator comprehension.
|
||||
# Include the brackets with the parent.
|
||||
comp = iterable.ArgumentGeneratorComprehension(
|
||||
self._evaluator, self.context, el)
|
||||
comp = iterable.GeneratorComprehension(
|
||||
self._evaluator,
|
||||
defining_context=self.context,
|
||||
comp_for_node=el.children[1],
|
||||
entry_node=el.children[0],
|
||||
)
|
||||
yield None, LazyKnownContext(comp)
|
||||
else:
|
||||
yield None, LazyTreeContext(self.context, el)
|
||||
|
||||
Reference in new issue
Block a user