From: Stefan Behnel Date: Wed, 29 Dec 2010 22:37:31 +0000 (+0100) Subject: merged in latest cython-devel X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=540dfa46391876ffb7efc663dcb6577842f0a2e8;p=cython.git merged in latest cython-devel --- 540dfa46391876ffb7efc663dcb6577842f0a2e8 diff --cc Cython/Compiler/ParseTreeTransforms.py index 73e72565,6ea7cc02..6aee9f0a --- a/Cython/Compiler/ParseTreeTransforms.py +++ b/Cython/Compiler/ParseTreeTransforms.py @@@ -1467,15 -1359,13 +1451,15 @@@ class CreateClosureClasses(CythonTransf if not from_closure and (self.path or inner_node): if not inner_node: - if not node.assmt: + if not node.py_cfunc_node: raise InternalError, "DefNode does not have assignment node" - inner_node = node.assmt.rhs + inner_node = node.py_cfunc_node inner_node.needs_self_code = False node.needs_outer_scope = False - # Simple cases - if not in_closure and not from_closure: + + if node.is_generator: + generator_class = self.create_generator_class(target_module_scope, node.pos) + elif not in_closure and not from_closure: return elif not in_closure: func_scope.is_passthrough = True