Re:Python Extension Proposal 498: Literal String Formatting
by cnvogel on Thursday August 27, 2015 @02:40AM
(#10127896)
Even .format() is quite redundant for the "standard" usage, as we had string interpolation using '%' with dicts for a long time.
'%s blah blah blah %s' % (x, y)
'{x} blah blah blah {y}'.format(x=x, y=y)
'%(x)s blah blah blah %(y)s'%{'y':y, 'x':x}
On top of that, there's a whole bunch of stuff you can do with .format() that just isn't possible with %.