Message405853
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. |
|
Date |
User |
Action |
Args |
2021-11-06 09:39:09 | mark.dickinson | set | recipients:
+ mark.dickinson, tim.peters, rhettinger, eric.smith, serhiy.storchaka, sobolevn, sndrtj |
2021-11-06 09:39:09 | mark.dickinson | set | messageid: <1636191549.83.0.132890201118.issue45708@roundup.psfhosted.org> |
2021-11-06 09:39:09 | mark.dickinson | link | issue45708 messages |
2021-11-06 09:39:09 | mark.dickinson | create | |
|