◐ Shell
clean mode source ↗

Message 70841 - Python tracker

The main problem with this is that the following code does not make any
sense:
"%(a)%" % dict(a=3)

It has no semantic meaning (take the dictionary paramater a, and do nothing
with it).
It must be a user bug (except in very wierd cases).

I agree that when I consider the implementaion, it makes sense, but as a
python user, this behavior is really non-intuitive.

2008/8/7 Guido van Rossum <report@bugs.python.org>

>
> Guido van Rossum <guido@python.org> added the comment:
>
> It's straightforward if you consider the implementation of the
> requirement that %% renders a single percent sign: the second % is
> parsed just like any other formatting code (i, d, f, etc.) and the stuff
> between the first % and the formatting code is treated completely
> uniformly.
>
> ----------
> nosy: +gvanrossum
> resolution:  -> rejected
> status: open -> closed
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue3516>
> _______________________________________
>