[issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal

Sander Bollen report at bugs.python.org
Fri Nov 5 08:41:28 EDT 2021


Sander Bollen <sander at sndrtj.eu> added the comment:

Thanks for looking into this so swiftly!

As a user, I have found PEP515 to be worded a little ambiguously with regards to formatting using underscores as thousands separators. While it enumerates a collection of types as far as the constructor is concerned, it does not do so for formatting. Instead, it says to support `_` as thousands separator for formatting wherever `,` is allowed. Since `,` does work for Decimal, I have taken that to imply `_` should work for Decimal as well.

----------

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


More information about the Python-bugs-list mailing list