[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

Mark Dickinson report at bugs.python.org
Fri Feb 7 03:50:47 EST 2020


Mark Dickinson <dickinsm at gmail.com> 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 <report at bugs.python.org>
<https://bugs.python.org/issue39576>
_______________________________________


More information about the Python-bugs-list mailing list