[Python-Dev] possible string formatting bug
aahz at pythoncraft.com
Mon Oct 8 17:15:44 CEST 2007
On Mon, Oct 08, 2007, Eli Courtwright wrote:
> I've found what might be a bug in Python's % string formatting operator.
> Consider the following code:
> "%%(%s)=%%s" % "hello"
> On "Python 2.5.1 (r251:54863, May 18 2007, 16:56:43) [GCC 3.4.4 (cygming
> special, gdc 0.12, using dmd 0.125)] on cygwin" this produces the string
> "%(hello)s=%s" which is what I'd expect.
> On "Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit
> (Intel)] on win32" this produces the following exception:
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> TypeError: not enough arguments for format string
> Note that this is the exact same revision running on the same machine, but
> it doesn't work for the win32 version and does work for the cygwin version.
Please submit a bug report to http://bugs.python.org/ -- that way it
won't get lost.
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
The best way to get information on Usenet is not to ask a question, but
to post the wrong information.
More information about the Python-Dev