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 akima
Recipients akima, facundobatista, mark.dickinson, rhettinger, skrah
Date 2014-08-30.10:57:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1409396272.92.0.0194141450691.issue22306@psf.upfronthosting.co.za>
In-reply-to
Content
Hi skrah.  Thanks for the feedback.  That specification is interesting.

As this IBM spec appears to be a /general/ specification for performing decimal arithmatic and not targetted specifically at Python's decimal arithmatic implementation, I would expect all of Python to adhere to its recommendations (for consitency).

If the division by 0 behaviour of the decimal module is in fact correct (as per the spec you have linked) and desirable, then perhaps the Python standard integer division by zero behaviour is incorrect.

>>> 0 / 0
... raises a ZeroDivisionError exception.  This is in conflict with the IBM spec and with the behaviour of the decimal module.  (I realize that arithmatic in the decimal module is not supposed to be equivalent to arithmatic with standard python number types, but this exception behaviour seems like something that should be consistent between the two arithmatic implementations.)
History
Date User Action Args
2014-08-30 10:57:52akimasetrecipients: + akima, rhettinger, facundobatista, mark.dickinson, skrah
2014-08-30 10:57:52akimasetmessageid: <1409396272.92.0.0194141450691.issue22306@psf.upfronthosting.co.za>
2014-08-30 10:57:52akimalinkissue22306 messages
2014-08-30 10:57:52akimacreate