This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients eric.smith, mark.dickinson, rhettinger, serhiy.storchaka, sndrtj, sobolevn, tim.peters
Date 2021-11-06.09:39:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1636191549.83.0.132890201118.issue45708@roundup.psfhosted.org>
In-reply-to
Content
Serhiy: this is not a duplicate of #43624. That issue is about underscores in the *fractional* part of a (float / complex / Decimal) number, and the changes to the formatting mini-language syntax that would be necessary to support that. This issue is simply about bringing Decimal into line with int and float and allowing inclusion of underscores in the *integral* part of the formatted result.

Raymond: the "General Decimal Arithmetic" specification that the decimal module is based on isn't relevant here. It has nothing to say on the subject of formatting. We moved beyond the specification the moment we allowed `format(some_decimal, 'f')`, let alone `format(some_decimal, '.3f')` or `format(some_decimal, ',')`.

As Sander Bollen noted, we've already added ","-form thousands separators to Decimal formatting. I can't see any good reason for supporting "," but not supporting "_" as a thousands separator for Decimal.
History
Date User Action Args
2021-11-06 09:39:09mark.dickinsonsetrecipients: + mark.dickinson, tim.peters, rhettinger, eric.smith, serhiy.storchaka, sobolevn, sndrtj
2021-11-06 09:39:09mark.dickinsonsetmessageid: <1636191549.83.0.132890201118.issue45708@roundup.psfhosted.org>
2021-11-06 09:39:09mark.dickinsonlinkissue45708 messages
2021-11-06 09:39:09mark.dickinsoncreate