summaryrefslogtreecommitdiff
path: root/Cython/Compiler/FlowControl.py
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2013-11-22 07:45:25 +0100
committerStefan Behnel <stefan_ml@behnel.de>2013-11-22 07:45:25 +0100
commita3d4461252315caeef3477399c49b4e9843cd479 (patch)
tree85595ce6a6bfea4ad5ca7da9a1a1ad0ced54a232 /Cython/Compiler/FlowControl.py
parenta10a6c0c9797ded2430fbcb59c228f7f8631c5aa (diff)
downloadcython-a3d4461252315caeef3477399c49b4e9843cd479.tar.gz
revert incomplete fix for ticket #600: not enough for more complex scoping and evaluation time issues
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