get rid of is_list_comp boolean in favor of a direct check of ListComprehensionFlow
This commit is contained in:
1 parent
dd8e4341db
commit
0b926ca454
7 files changed
+17
-21
No files matched your search
@@ -497,3 +497,13 @@ def create_indexes_or_slices(evaluator, index_array):
|
||||
return (Slice(evaluator, start, stop, step),)
|
||||
else:
|
||||
return tuple(evaluator.process_precedence_element(prec))
|
||||
|
||||
|
||||
class ListComprehensionFlow(pr.ForFlow):
|
||||
"""Fake implementation to pretend being a ForFlow."""
|
||||
def __init__(self, list_comprehension, input, parent):
|
||||
lc = list_comprehension
|
||||
sup = super(ListComprehensionFlow, self)
|
||||
sup.__init__(helpers.FakeSubModule, [input], lc.parent.start_pos, lc.middle)
|
||||
self.parent = parent or lc.get_parent_until(pr.IsScope)
|
||||
self.list_comprehension = list_comprehension
|
||||
Reference in new issue
Block a user