Stefan Krah added the comment: 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 ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21227> _______________________________________