Patches item #1400181, was opened at 2006-01-09 10:02
Message generated for change (Comment added) made by birkenfeld
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1400181&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Core (C code)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Neal Norwitz (nnorwitz)
Assigned to: Nobody/Anonymous (nobody)
Summary: unicode formats floats according to locale

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


Fails with HEAD and 2.4 because the locale is used and
1,0 is generated rather than 1.0.

I tried to come up with a test case, but it always
passes when run with the test suite.  I could only
reproduce in the interpreter.  Both the fix and test
are attached.  The test has some debugging to try and
figure out the problem.

----------------------------------------------------------------------

>Comment By: Georg Brandl (birkenfeld)
Date: 2006-01-09 20:17

Message:
Logged In: YES 
user_id=1188172

Confirmed here too. Your test fails with unpatched HEAD when
run from regrtest (I have de_DE locale in the environment).

----------------------------------------------------------------------

Comment By: Gustavo J. A. M. Carneiro (gustavo)
Date: 2006-01-09 14:08

Message:
Logged In: YES 
user_id=908

I can confirm the patch compiles and fixes the problem.
I also can't reproduce the problem except from the python
shell.  Weird.

----------------------------------------------------------------------

Comment By: M.-A. Lemburg (lemburg)
Date: 2006-01-09 12:43

Message:
Logged In: YES 
user_id=38388

The patch looks good.

What's strange is that if you run the snippet in Python 2.3
you don't get the assertion error (at least I don't).


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1400181&group_id=5470
_______________________________________________
Patches mailing list
[email protected]
http://mail.python.org/mailman/listinfo/patches

Reply via email to