Rough draft: Proposed format specifier for a thousands separator
sjmachin at lexicon.net
Thu Mar 12 13:58:50 CET 2009
On Mar 12, 9:56 pm, Raymond Hettinger <pyt... at rcn.com> wrote:
> [Ulrich Eckhardt]
> > IOW, why not explicitly say what you want using keyword arguments with
> > defaults instead of inventing an IMHO cryptic, read-only mini-language?
> That makes sense to me but I don't think that's the way the format()
> builtin was implemented (see PEP 3101 which was implemented Py2.6 and
> It is a simple pass-through to a __format__ method for each
> object. I don't see how keywords would fit in that framework. What
> proposed is similar to locale module's existing "n" specifier except
> this lets you say exactly what you want instead of deferring to the
> The mini-language seems to already be the way of things (just as it is
> many other languages including PHP, C, Fortran, and whatnot). I'm
> proposing an addition "T," so you add commas as a thousands separator.
... and why not C (centum) for hundreds (can't have H(ollerith)) and W
for wan (the Chinese word for 10 thousand)?
More information about the Python-list