Mark Dickinson <dicki...@gmail.com> added the comment: I think it's actually easier for the user if we keep the exception type as it is, so that it's clear which flag it corresponds to. This didn't occur to me until I looked at the section of the doctests (around line 100 in decimal.py) that looks like:
>>> print c.divide(Decimal(0), Decimal(0)) Traceback (most recent call last): ... ... ... InvalidOperation: 0 / 0 >>> print c.flags[InvalidOperation] 1 If the traceback specified 'DivisionUndefined' instead then the user has to figure out that the corresponding flag/trap is InvalidOperation. Of course this could be worked around by giving a more detailed error message, e.g. DivisionUndefined: (InvalidOperation) 0/0, but this doesn't seem worth changing to me. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7046> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com