Mark Dickinson <dicki...@gmail.com> added the comment:

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.

----------
nosy: +mark.dickinson

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45708>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to