From: Stefan Behnel Date: Thu, 28 Jan 2010 20:42:59 +0000 (+0100) Subject: catch ArithmeticError during constant folding => not constant X-Git-Tag: 0.12.1~7 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9de4dbae984dc42fed3fa000ccd7c2c396ae22ca;p=cython.git catch ArithmeticError during constant folding => not constant --- diff --git a/Cython/Compiler/Optimize.py b/Cython/Compiler/Optimize.py index a5b1378f..5936294d 100644 --- a/Cython/Compiler/Optimize.py +++ b/Cython/Compiler/Optimize.py @@ -1757,7 +1757,7 @@ class ConstantFolding(Visitor.VisitorTransform, SkipDeclarations): node.calculate_constant_result() # if node.constant_result is not ExprNodes.not_a_constant: # print node.__class__.__name__, node.constant_result - except (ValueError, TypeError, KeyError, IndexError, AttributeError): + except (ValueError, TypeError, KeyError, IndexError, AttributeError, ArithmeticError): # ignore all 'normal' errors here => no constant result pass except Exception: