From: Stefan Behnel Date: Tue, 25 May 2010 06:51:35 +0000 (+0200) Subject: revert comprehensions to their previous (var-leaking) behaviour X-Git-Tag: 0.13.beta0~2^2~52 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5ef1b0a5d0d5d3a0f000af7f268aaa4bcfc31ad6;p=cython.git revert comprehensions to their previous (var-leaking) behaviour --- diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 954fccda..d1561447 100755 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -3920,7 +3920,7 @@ class ScopedExprNode(ExprNode): pass -class ComprehensionNode(ScopedExprNode): +class ComprehensionNode(ExprNode): # (ScopedExprNode) subexprs = ["target"] child_attrs = ["loop", "append"] @@ -3929,16 +3929,18 @@ class ComprehensionNode(ScopedExprNode): def analyse_declarations(self, env): self.append.target = self # this is used in the PyList_Append of the inner loop - self.expr_scope = Symtab.GeneratorExpressionScope(env) - self.loop.analyse_declarations(self.expr_scope) + self.loop.analyse_declarations(env) +# self.expr_scope = Symtab.GeneratorExpressionScope(env) +# self.loop.analyse_declarations(self.expr_scope) def analyse_types(self, env): self.target.analyse_expressions(env) self.type = self.target.type - - def analyse_scoped_expressions(self, env): self.loop.analyse_expressions(env) +# def analyse_scoped_expressions(self, env): +# self.loop.analyse_expressions(env) + def may_be_none(self): return False