Message216622
The idea behind the list as the exception message is this: If multiple
conditions would have raised the signal they are all listed, while the
"highest ranking" signal is the one that is ultimately raised.
>>> from decimal import *
>>> c = getcontext()
>>> for v in c.traps:
... c.traps[v] = True
...
>>>
>>> Decimal(8) ** 1000000000000000
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
decimal.Overflow: [<class 'decimal.Overflow'>, <class 'decimal.Inexact'>, <class 'decimal.Rounded'>]
Exception precedence is listed here at the bottom of the page:
http://speleotrove.com/decimal/daexcep.html |
|
Date |
User |
Action |
Args |
2014-04-16 23:17:35 | skrah | set | recipients:
+ skrah, tim.peters, rhettinger, facundobatista, mark.dickinson, docs@python, leewz |
2014-04-16 23:17:35 | skrah | link | issue21227 messages |
2014-04-16 23:17:35 | skrah | create | |
|