From 9de4dbae984dc42fed3fa000ccd7c2c396ae22ca Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Thu, 28 Jan 2010 21:42:59 +0100 Subject: [PATCH] catch ArithmeticError during constant folding => not constant --- Cython/Compiler/Optimize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- 2.26.2