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

spir denis.spir at free.fr
Thu Mar 19 10:12:20 CET 2009

Le Thu, 19 Mar 2009 08:33:43 +1000,
Nick Coghlan <ncoghlan at gmail.com> s'exprima ainsi:

> B. All I can suggest is to try to think of the "commas as separators in
> format()" situation as being in the same vein as that whole "let use
> English keywords where possible" idea :)

This is a wrong rationale. The readers of python keywords is the community of pythonistas (*); while the readers of documents produced by apps written in python can be any kind of people.
"1,234,567.89" is more or less illegible for people not used to english conventions. Specifying the separator(s) is definitely a bad idea imo.
I have not understood the proposal to be intended only for debug, but for all kinds of quick and/or unpublished developpment. Even in the first case, having numbers output in the format your eyes are used to is a nice & worthful help.
Imagine you -- and all programmers, and millions of users -- would have to cope with numbers like "1.234.567,89" all the time only because someone decided (for any reason) that separators must be fixed, and this format is the obvious one.


(*) ditto about english naming, comments, & doc inside standard library

la vita e estrany

More information about the Python-ideas mailing list