[docs] [issue23460] Decimals do not obey ':g' exponential notation formatting rules

Stefan Krah report at bugs.python.org
Sun Feb 24 08:53:55 EST 2019


Stefan Krah <stefan at bytereef.org> added the comment:

I just noticed that there are other differences, for example the "removal of trailing zeros" passage does not apply to Decimal:

>>> format(Decimal("1.000000e-6"), "g")
'0.000001000000'

Perhaps it would be easier to have separate docs for float and decimal after all, or a long footnote for decimal.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue23460>
_______________________________________


More information about the docs mailing list