]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Backport:
authorNeal Norwitz <nnorwitz@gmail.com>
Tue, 10 Jan 2006 06:05:57 +0000 (06:05 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Tue, 10 Jan 2006 06:05:57 +0000 (06:05 +0000)
commit7fb3aa7b3c8d9f4325c3822b6374bff9e11492c0
treefac6c63ac746fa3076c155388fd84da95eb50299
parent5ce8a8909f7c7f33fcfb022b6ca4aea97ab03d49
Backport:
- Patch #1400181, fix unicode string formatting to not use the locale.
  This is how string objects work.  u'%f' could use , instead of .
  for the decimal point.  Now both strings and unicode always use periods.

This is the code that would break:

    import locale
    locale.setlocale(locale.LC_NUMERIC, 'de_DE')
    u'%.1f' % 1.0
    assert '1.0' == u'%.1f' % 1.0

I couldn't create a test case which fails, but this fixes the problem.
(tested in interpreter and reported fixed by others)
Misc/NEWS
Objects/unicodeobject.c