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

Mathias Panzenböck grosser.meister.morti at gmx.net
Sun Mar 15 18:35:05 CET 2009


Scott David Daniels wrote:
 > Raymond Hettinger wrote:
 >> Todays updates to:  http://www.python.org/dev/peps/pep-0378/
 >>
 >> * Summarize commentary to date.
 >> * Add APOSTROPHE and non-breaking SPACE to the list of separators.
 >> * Add more links to external references.
 >> * Detail issues with the locale module.
 >> * Clarify how proposal II is parsed.
 > Still doesn't specify to digits beyond the decimal point.  I don't
 > really care what the choice is, but I do care that the choice is
 > specified.  Is the precision in digits, or is it width of the post-
 > decimal point field?  If the latter, does a precision of 4 end with
 > a comma or not?
 >
 > In particular, what should (format(9876.54321, "13,.5f"),
 > format(9876.54321, "12,.4f")) produce?
 > Possible "reasonable" answers:
 >    A   '  9,876.54321', '  9,876.5432'
 >    B   ' 9,876.543,21', ' 9,876.543,2'
 >    C   '  9,876.543,2', '  9,876.543,'
 >    D   '  9,876.543,2', '   9,876.543'
 > I prefer B, but I can see an argument for any of the four above.
 >
 >
 > --Scott David Daniels
 > Scott.Daniels at Acm.Org
 >

Has anyone mentioned yet that in german you write the following?
10.000.000,000.001

(In german , and . are swapped.)

Is this aspect taken into account? How is i18n/l10n managed?


	-panzi



More information about the Python-ideas mailing list