[Python-Dev] %-formatting depracation

Nick Coghlan ncoghlan at gmail.com
Tue Feb 22 23:13:44 CET 2011


On Wed, Feb 23, 2011 at 8:03 AM, Antoine Pitrou <solipsis at pitrou.net> wrote:
> I think there are many people still finding %-style more practical for
> simple uses,

A lot of the sting went out of that objection when field autonumbering
was added to new-style formatting ("'%s' % (obj,)" vs
"'{}'.format(obj)" as the minimal case that correctly handles tuples).
The addition of format_map() reduces it even further.

> so this might be a case of "practicality beats purity"
> over "there should be one obvious way to do it".

I agree with that part though, just for historical reasons rather than
seeing much in the way in the way of inherent advantages with %-style
formatting.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-Dev mailing list