summaryrefslogtreecommitdiff
path: root/Cython/Compiler/FlowControl.py
diff options
context:
space:
mode:
Diffstat (limited to 'Cython/Compiler/FlowControl.py')
-rw-r--r--Cython/Compiler/FlowControl.py14
1 files changed, 3 insertions, 11 deletions
diff --git a/Cython/Compiler/FlowControl.py b/Cython/Compiler/FlowControl.py
index e1a8492cc..46a79d8a5 100644
--- a/Cython/Compiler/FlowControl.py
+++ b/Cython/Compiler/FlowControl.py
@@ -10,7 +10,6 @@ import Builtin
import ExprNodes
import Nodes
import Options
-import Symtab
from PyrexTypes import py_object_type, unspecified_type
import PyrexTypes
@@ -985,20 +984,13 @@ class ControlFlowAnalysis(CythonTransform):
next_block = self.flow.newblock()
# Condition with iterator
self.flow.loops.append(LoopDescr(next_block, condition_block))
-
- is_normal_for_loop = isinstance(node, Nodes.ForInStatNode)
- if is_normal_for_loop and node.first_in_genexp:
- self.env_stack.append(self.env)
- self.env = Symtab.NonLocalScopeWrapper(self.env)
self._visit(node.iterator)
- if is_normal_for_loop and node.first_in_genexp:
- self.env = self.env_stack.pop()
-
# Target assignment
self.flow.nextblock()
- if is_normal_for_loop:
+
+ if isinstance(node, Nodes.ForInStatNode):
self.mark_forloop_target(node)
- else: # Parallel
+ else: # Parallel
self.mark_assignment(node.target)
# Body block