walterbyrd wrote:
On Dec 19, 12:43 pm, excord80 <excor...@gmail.com> wrote:

Also, I like having only *one* special symbol (`%') to worry
about in my strings instead of two (`{' and `}').


Actually the new way has, at least three special symbols: ( '{', '}' ,
'.') as well as the method name "format" so

"%s=%s" % (k, v) for k, v in params.items()

becomes:

"{0}={1}".format((k, v) for k, v in params.items())

or something like that.

"{0}={1}".format(k, v) for k, v in params.items()

or:

"{0}={1}".format(*i) for i in params.items()
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to