Convert simple formatting templates to '%' compatible form (optional).
Bug #881141 reported by
Denis Zawada
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
awkwardduet |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
For compatibility with Python 2.5 certain simple formatting templates could be replaced using the old ‘%’ operator.
E.g.
'{0} has {1} snake eggs'.format('Foo', 5) →
'%s has %s snake eggs' % ('Foo', 5)
'{0!r}'.format(foo) →
'%r' % foo
'{0.name} {1[name]
'%s %s' % (foo.name, bar['name'])
To post a comment you must log in.