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 mark.dickinson
Recipients mark.dickinson, multiks2200
Date 2021-01-15.15:38:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1610725085.84.0.474969613536.issue42936@roundup.psfhosted.org>
In-reply-to
Content
The behaviour is deliberate, if unfortunate: it's covered in the documentation here: https://docs.python.org/3/library/decimal.html#decimal-objects - see the paragraph starting

> There are some small differences between arithmetic on Decimal objects
> and arithmetic on integers and floats. When the remainder operator % is
> applied to Decimal objects

The issue is that the decimal spec specifies "divide-integer" and "remainder" operations. We've chosen to map those operations to "%" and "//" for convenience, even though there's a difference between float and Decimal here.
History
Date User Action Args
2021-01-15 15:38:05mark.dickinsonsetrecipients: + mark.dickinson, multiks2200
2021-01-15 15:38:05mark.dickinsonsetmessageid: <1610725085.84.0.474969613536.issue42936@roundup.psfhosted.org>
2021-01-15 15:38:05mark.dickinsonlinkissue42936 messages
2021-01-15 15:38:05mark.dickinsoncreate