mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Use the same exception hierarchy as decimal.py. FloatOperation now also
inherits from TypeError. Cleanup in module initialization to make repeated import failures robust.
This commit is contained in:
parent
4b0215fd99
commit
b6405efd1b
4 changed files with 107 additions and 22 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue