Rough draft: Proposed format specifier for a thousands separator

Raymond Hettinger python at rcn.com
Thu Mar 12 13:15:12 EDT 2009


[Paul Rubin]
> It would be nice if the PEP included a comparison between the proposed
> scheme and how it is done in other programs and languages.

Good idea.  I'm hoping that people will post those here.
In my quick research, it looks like many languages offer
nothing more than the usual C style % formatting and defer
the rest for a local aware module.


>  For
> example, I think Common Lisp has a feature for formatting thousands.

Do you have more detail?


> Spreadsheets like Excel probably have something similar.

I addressed that in the PEP in the section on VB and relatives.  Their
approach doesn't graft-on to our existing approach.  They use format
specifiers like: "_($* #,##0_)".


Raymond



More information about the Python-list mailing list