projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7c41b1b
)
catch ArithmeticError during constant folding => not constant
author
Stefan Behnel
<scoder@users.berlios.de>
Thu, 28 Jan 2010 20:42:59 +0000
(21:42 +0100)
committer
Stefan Behnel
<scoder@users.berlios.de>
Thu, 28 Jan 2010 20:42:59 +0000
(21:42 +0100)
Cython/Compiler/Optimize.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/Optimize.py
b/Cython/Compiler/Optimize.py
index a5b1378fc98b02e6475aaf8d70d7f2d687d43cf3..5936294d85a348da222fa9ddac85a4ff4260667e 100644
(file)
--- 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: