This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skrah
Recipients docs@python, leewz, skrah
Date 2014-04-16.17:55:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <20140416175507.GA21044@sleipnir.bytereef.org>
In-reply-to <1397669752.09.0.1867148711.issue21227@psf.upfronthosting.co.za>
Content
My apologies if that wasn't clear: "fine grained" refers to the exception
messages.  A function can raise InvalidOperation for different reasons.

decimal.py gives a specific error message in each case. libmpdec just
signals the standard conforming InvalidOperation.

The relevant passage from the standard is here:

http://speleotrove.com/decimal/daops.html#refremain

  "This operation will fail under the same conditions as integer division."

decimal.py, decNumber and libmpdec all do the same thing, so there is no
libmpdec issue other than that the error *messages* could be improved.

I fully understand if you find the behavior surprising (after all the remainder
fits in the precision), but as long as we follow the standard we can't change
that.
History
Date User Action Args
2014-04-16 17:55:08skrahsetrecipients: + skrah, docs@python, leewz
2014-04-16 17:55:08skrahlinkissue21227 messages
2014-04-16 17:55:08skrahcreate