[Python-Dev] locale and LC_NUMERIC (original) (raw)
Neal Norwitz nnorwitz at gmail.com
Mon Jan 9 10:12:31 CET 2006
- Previous message: [Python-Dev] locale and LC_NUMERIC
- Next message: [Python-Dev] locale and LC_NUMERIC
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 1/8/06, "Martin v. Löwis" <martin at v.loewis.de> wrote:
Georg Brandl wrote: > >>> import locale > >>> locale.setlocale(locale.LCNUMERIC, "") > 'deDE at euro' > >>> u"%f" % 1.0 > u'1,000000' > > Is this intended? This breaks testformat on my box when testbuiltin (method > testfloatwithcomma) is executed first.
No. %-formatting should always use the C locale. One should use locale.format to get locale-aware formatting.
http://python.org/sf/1400181 fixes this problem I hope.
n
- Previous message: [Python-Dev] locale and LC_NUMERIC
- Next message: [Python-Dev] locale and LC_NUMERIC
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]