Author serhiy.storchaka
Recipients Jerry Dimitrov, benjamin.peterson, larry, ned.deily, rhettinger, serhiy.storchaka
Date 2017-02-15.15:19:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1487171977.53.0.53683533346.issue29568@psf.upfronthosting.co.za>
In-reply-to
Content
In this example characters between percents are parsed as for any conversion specifier but ignored and '%(a) %' is formatted to '%'. '(a)' specifies a mapping key, ' ' is a conversion flag, the second '%' is a conversion type.

>>> '%(a) d' % {'a': 123}
' 123'
>>> '%(a) %' % {'a': 123}
'%'

This behavior is explicable but looks weird and errorprone. I'm not sure about changing behavior in maintained branches (technically this may be not a bug), but I think it is worth to make this an error in the developed branch.
History
Date User Action Args
2017-02-15 15:19:37serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, larry, benjamin.peterson, ned.deily, Jerry Dimitrov
2017-02-15 15:19:37serhiy.storchakasetmessageid: <1487171977.53.0.53683533346.issue29568@psf.upfronthosting.co.za>
2017-02-15 15:19:37serhiy.storchakalinkissue29568 messages
2017-02-15 15:19:37serhiy.storchakacreate