Barry A. Warsaw ba...@python.org added the comment:
Hmm. See bug 10379 for fallout from this change. I'm not saying it should be
reverted but see that issue for further discussion.
--
nosy: +barry
___
Python tracker rep...@bugs.python.org
Barry A. Warsaw ba...@python.org added the comment:
I mean issue 10379
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2522
___
___
R. David Murray rdmur...@bitdance.com added the comment:
Fixed in r70936/r70938.
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2522
Andrii V. Mishkovskyi misho...@gmail.com added the comment:
Nice to see this moving forward. Your patch looks nicer than my naive
approach and I hope it's going to be applied. Thanks for investigation. :)
--
___
Python tracker rep...@bugs.python.org
R. David Murray rdmur...@bitdance.com added the comment:
It occured to me last night that it could be checked using a regular
expression, and indeed the locale module already has a regular
expression that matches percent codes. I've uploaded a patch that uses
this regex to fix this issue. I've
R. David Murray rdmur...@bitdance.com added the comment:
This bug is more subtle than it first appears. As far as I've been able
to figure out, there is in fact no way to reliably detect that there is
non-format text after the format specifier short of completely parsing
the format specifier.
Antoine Pitrou pit...@free.fr added the comment:
AFAIK, locale.format() is supposed to be used with a single format
specifier, not a complete format string. It's up to you to concatenate
the various parts afterwards.
--
nosy: +pitrou
___
Python
R. David Murray rdmur...@bitdance.com added the comment:
That is true, however the code contains the comment this is only for
one-percent-specifier strings and this should be checked, implying
that the intent is to make sure only a single format specifier
has been passed. I don't think it is
Andrii V. Mishkovskyi [EMAIL PROTECTED] added the comment:
I've uploaded a patch that fixes this concrete issue, though
locale.format() continues to silently ignore other types of malformed
strings (e.g. locale.format('%fSPAMf')).
I don't think this is correct behavior. Maybe there should be
New submission from Andrii V. Mishkovskyi [EMAIL PROTECTED]:
locale.format() doesn't insert correct decimal separator to string
representation when 'format' argument has '\r' or '\n' symbols in it.
This bug has been reproduced on Python 2.5.2 and svn-trunk.
Python 2.4.5 (#2, Mar 12 2008,
10 matches
Mail list logo