Skip to content

Commit 9dceb9a

Browse files
committed
Revert "Update for_helpers.py"
This reverts commit c9680dc.
1 parent 8e43b2e commit 9dceb9a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mypyc/irbuild/for_helpers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,9 @@ class ForFilter(ForGenerator):
11641164
"""Generate optimized IR for a for loop over filter(f, iterable)."""
11651165

11661166
def need_cleanup(self) -> bool:
1167-
return self.gen.need_cleanup()
1167+
# The wrapped for loops might need cleanup. We might generate a
1168+
# redundant cleanup block, but that's okay.
1169+
return True
11681170

11691171
def init(self, index: Lvalue, func: Expression, iterable: Expression) -> None:
11701172
self.filter_func_def = func

0 commit comments

Comments
 (0)