From: Stefan Behnel Date: Fri, 21 Aug 2009 12:54:26 +0000 (+0200) Subject: merged in latest cython-devel X-Git-Tag: 0.12.alpha0~224 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b84191511961b2f5312c0a6d18b834363c797232;p=cython.git merged in latest cython-devel --- b84191511961b2f5312c0a6d18b834363c797232 diff --cc Cython/Compiler/Optimize.py index f40a301b,cfd4a933..f6ef6a82 --- a/Cython/Compiler/Optimize.py +++ b/Cython/Compiler/Optimize.py @@@ -7,24 -7,13 +7,20 @@@ import UtilNode import TypeSlots import Symtab import Options -from StringEncoding import EncodedString +from Code import UtilityCode +from StringEncoding import EncodedString +from Errors import error from ParseTreeTransforms import SkipDeclarations +try: + reduce +except NameError: + from functools import reduce + - #def unwrap_node(node): - # while isinstance(node, ExprNodes.PersistentNode): - # node = node.arg - # return node - - # Temporary hack while PersistentNode is out of order def unwrap_node(node): + while isinstance(node, UtilNodes.ResultRefNode): + node = node.expression return node def is_common_value(a, b):