Patches item #1534027, was opened at 2006-08-03 13:59
Message generated for change (Comment added) made by akuchling
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1534027&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: Documentation
Group: Python 2.5
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Iain Lowe (ilowe54)
Assigned to: A.M. Kuchling (akuchling)
Summary: Add notes on locale module changes to whatsnew25.tex

Initial Comment:
This patch modifies the whatsnew25.tex to reflect
changes to the locale module.

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

>Comment By: A.M. Kuchling (akuchling)
Date: 2006-08-09 09:57

Message:
Logged In: YES 
user_id=11375

Applied in rev. 51169 with some markup and wording changes.
Thanks!


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

Comment By: Iain Lowe (ilowe54)
Date: 2006-08-03 14:30

Message:
Logged In: YES 
user_id=103438

Updated description of changes to format

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

Comment By: Georg Brandl (gbrandl)
Date: 2006-08-03 14:19

Message:
Logged In: YES 
user_id=849994

Okay, that works. But look at

>>> locale.format('test %0.2f %0.2f', (2.0, 2.0))
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.4/locale.py", line 143, in format
    raise Error, "Too many decimal points in result string"
locale.Error: Too many decimal points in result string

or 

>>> locale.format('%i .test', 0)
'0 ,test'

(in a German locale). So the only thing format() did do
without unwanted side-effects was and is to convert exactly
one %char code.

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

Comment By: Iain Lowe (ilowe54)
Date: 2006-08-03 14:17

Message:
Logged In: YES 
user_id=103438

Updated the patch to add some more details on format_string
and currency functions.

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

Comment By: Iain Lowe (ilowe54)
Date: 2006-08-03 14:11

Message:
Logged In: YES 
user_id=103438

I'm able to pass a string in 2.4; what am I doing wrong?
I'll update the patch with more details on the other two
functions.

Python 2.4.2 (#1, Oct 16 2005, 05:52:17)
[GCC 3.3.5 (Debian 1:3.3.5-13)] on linux2
Type "help", "copyright", "credits" or "license" for more
information.
>>> import locale
>>> locale.format('This is my %dnd test', 2)
'This is my 2nd test'
>>>


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

Comment By: Georg Brandl (gbrandl)
Date: 2006-08-03 14:06

Message:
Logged In: YES 
user_id=849994

The patch is wrong, format() did never allow anything other
than a single %char. (The difference is that it's now
documented).

A little bit more should be written about the two new functions.

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

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

Reply via email to