Message385114
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. |
|
Date |
User |
Action |
Args |
2021-01-15 15:38:05 | mark.dickinson | set | recipients:
+ mark.dickinson, multiks2200 |
2021-01-15 15:38:05 | mark.dickinson | set | messageid: <1610725085.84.0.474969613536.issue42936@roundup.psfhosted.org> |
2021-01-15 15:38:05 | mark.dickinson | link | issue42936 messages |
2021-01-15 15:38:05 | mark.dickinson | create | |
|