This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author barry
Recipients amaury.forgeotdarc, barry, r.david.murray
Date 2010-11-09.23:58:52
SpamBayes Score 1.49056e-10
Marked as misclassified No
Message-id <>
Okay, so line 187 of has this test:

    if not match or len(!= len(percent):

the problematic part is the len test.  When format string is '%.0f KB' is '%.0f' but of course percent is the full string.

This seems like a bogus test, since clearly the given input is a valid format string.  I'm not sure what the intent of this test is.  The Python 2.6 test is:

    if percent[0] != '%':

which is perhaps too naive.

I guess I don't understand why this test is here.  Wouldn't it make more sense to either just let any TypeError from _format() to percolate up, or to catch that TypeError and transform it into the ValueError?  Why try to replicate the logic of str.__mod__()?
Date User Action Args
2010-11-09 23:58:54barrysetrecipients: + barry, amaury.forgeotdarc, r.david.murray
2010-11-09 23:58:54barrysetmessageid: <>
2010-11-09 23:58:52barrylinkissue10379 messages
2010-11-09 23:58:52barrycreate