[issue2802] str.format() :n integer output
Mark Dickinson
report at bugs.python.org
Fri May 9 17:12:03 CEST 2008
Mark Dickinson <dickinsm at gmail.com> added the comment:
> As to the implementation, the OS supplied float formatting does not add
> thousands separators. I added the function add_thousands_grouping() to
> Python/pystrtod.c in order implement this for floats.
Excellent! I didn't realise this code was already there. Maybe there's
also some way to use it to implement 'n' formatting for Decimal (which in
some ways behaves like a hybrid floating-point and integer type).
I can't think of any reason that the LC_NUMERIC stuff shouldn't apply to
integers as well as floats.
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2802>
__________________________________
More information about the Python-bugs-list
mailing list