Very stupid question about a % symbol

Xavier Ho contact at xavierho.com
Fri Sep 17 07:23:13 EDT 2010


On 17 September 2010 12:48, Terry Reedy <tjreedy at udel.edu> wrote:

> Doubling an escape char, whatever it is, is a common convention:
> >>> print("Print a {{}} format string line this: {{{}}}".format(2))
> Print a {} format string line this: {2}
>

Wow. That's convoluted. Took me a minute to process.

Cheers,
Xav
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100917/0b2b6a93/attachment-0001.html>


More information about the Python-list mailing list