Message287859
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. |
|
Date |
User |
Action |
Args |
2017-02-15 15:19:37 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, rhettinger, larry, benjamin.peterson, ned.deily, Jerry Dimitrov |
2017-02-15 15:19:37 | serhiy.storchaka | set | messageid: <1487171977.53.0.53683533346.issue29568@psf.upfronthosting.co.za> |
2017-02-15 15:19:37 | serhiy.storchaka | link | issue29568 messages |
2017-02-15 15:19:37 | serhiy.storchaka | create | |
|