Mark Dickinson <[email protected]> added the comment:
Agreed that this seems surprising.
@Vedran: Trailing zeros in a Decimal object are significant, so
`Decimal("2.0")` and `Decimal("2.00")` are different (equal, but different).
The rules about the "ideal exponent" of the result of an arithmetic operation
are well-specified. In this case, the spec is clear that the answer should be
`Decimal("2")`, and not `Decimal("2.0")` or `Decimal("2.00")`, or ....
----------
nosy: +mark.dickinson
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue39576>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com