summaryrefslogtreecommitdiffstats
path: root/Lib/decimal.py
diff options
context:
space:
mode:
authorStefan Krah <skrah@bytereef.org>2012-03-23 13:46:48 (GMT)
committerStefan Krah <skrah@bytereef.org>2012-03-23 13:46:48 (GMT)
commitb6405efd1bf8031fc3f15fbeba4f0e048844a50d (patch)
treeb78f15d0ea428616cd0158317b56fac671f5921d /Lib/decimal.py
parent4b0215fd997cbdc714cb7515e121be96b9087cf4 (diff)
downloadcpython-b6405efd1bf8031fc3f15fbeba4f0e048844a50d.zip
cpython-b6405efd1bf8031fc3f15fbeba4f0e048844a50d.tar.gz
cpython-b6405efd1bf8031fc3f15fbeba4f0e048844a50d.tar.bz2
Use the same exception hierarchy as decimal.py. FloatOperation now also
inherits from TypeError. Cleanup in module initialization to make repeated import failures robust.
Diffstat (limited to 'Lib/decimal.py')
-rw-r--r--Lib/decimal.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/decimal.py b/Lib/decimal.py
index b6f66ab..6bd655b 100644
--- a/Lib/decimal.py
+++ b/Lib/decimal.py
@@ -391,7 +391,7 @@ class Underflow(Inexact, Rounded, Subnormal):
In all cases, Inexact, Rounded, and Subnormal will also be raised.
"""
-class FloatOperation(DecimalException):
+class FloatOperation(DecimalException, TypeError):
"""Enable stricter semantics for mixing floats and Decimals.
If the signal is not trapped (default), mixing floats and Decimals is