Think of it as using a name instead of a position for your "%s".

In addition to what others already said, I thought I'd add an example
of where this is useful.
One place where you don't just want to have a position is when doing
internatiolization.
When translating for example:
"I'm going by %(transport)s to %(place)s" % ( {'transport' : 'car',
'place' : 'mexico'} )

In another language, the 'place' and 'transport' might not be in the
same order in the sentence, so pretty much the only way to get it
right is to use named parameters instead of positions.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to