[issue7046] decimal.py: use DivisionImpossible and DivisionUndefined

Stefan Krah report at bugs.python.org
Sun Oct 4 00:06:48 CEST 2009


Stefan Krah <stefan-usenet at bytereef.org> added the comment:

Thanks for the explanation, and I agree that decimal.py is perfectly
correct. I based the report on the fact that decNumber updates the
context status with e.g. Division_impossible. But Division_impossible is
one of the flags that form IEEE_754_Invalid_operation, so presumably the
intention is to signal IEEE_754_Invalid_operation by means of flagging
Division_impossible.

On a side note, I find the distinction between signals and exceptional
conditions (mandated by the spec, as you pointed out) needlessly
complicated and I'm happy to see that note 5 under "Abstract
representation of context" says this might change in the future.

I'm all for raising DivisionImpossible, if it is not too much trouble.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7046>
_______________________________________


More information about the Python-bugs-list mailing list