[Python-ideas] 1_000_000
Guido van Rossum
guido at python.org
Sat May 7 23:06:12 CEST 2011
On Sat, May 7, 2011 at 12:51 PM, Eric Smith <eric at trueblade.com> wrote:
> On 05/06/2011 11:45 PM, Guido van Rossum wrote:
>
>> It would also be nice to have an easy way to emit _ in suitable
>> places. Maybe this could be added to the .format() language for
>> numbers? It would be nice if you could tell it to emit an _ every N
>> positions.
>
> We already support commas (PEP 378). Adding underscores in the same way
> would be easy. However, you can't specify N, it's always 3.
Which would suck for non-decimal formats. :-( Also there seem to be
some countries where the conventions for formatting currency uses
groupings other than 1000. E.g.
http://www.ozgrid.com/forum/showthread.php?t=10226 (though specifying
N wouldn't be enough there).
--
--Guido van Rossum (python.org/~guido)
More information about the Python-ideas
mailing list