]> granicus.if.org Git - python/commit
- Patch #1400181, fix unicode string formatting to not use the locale.
authorNeal Norwitz <nnorwitz@gmail.com>
Tue, 10 Jan 2006 06:03:13 +0000 (06:03 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Tue, 10 Jan 2006 06:03:13 +0000 (06:03 +0000)
commitfc76d633e8017fd948bc2363738cbdea41586e21
tree7015f5d5c57eec77290891b156fa1d2ffa14e06d
parentab92afd100a4406cd296d699a69184b74abe4cf7
- 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.

Will backport.
Misc/NEWS
Objects/unicodeobject.c