[Python-ideas] Rough draft: Proposed format specifier for a thousands separator (discussion moved from python-dev)

Raymond Hettinger python at rcn.com
Thu Mar 12 08:49:24 CET 2009


[spir]
> Probably you know that already, but it doesn't hurt anyway.
> In french and most rroman languages comma is the standard decimal sep; and either space or dot is used, when necessary, to sep 
> thousands. (It's veeery difficult for me to read even short numbers with commas used as thousand separator.)
>
> en: 1,234,567.89
> fr: 1.234.567,89
> or: 1 234 567,89

Thanks for the informative comment.  It looks like your needs are best met by Proposal II where those would be written as:

   en_num = format(x, "12T, 2f")
   fr_num = format(x, "12T.,2f")
  or_num =format(x, "12T ,2f")

Raymond 




More information about the Python-ideas mailing list