raw strings and \

Blackbird fake at nospam.no
Mon Mar 6 04:43:14 EST 2006


Slightly OT, but here is a crazy little program that shows the power of
using raw strings:

s=r'print "s=r\'%s\'\n%s"%(s,s)'
print "s=r\'%s\'\n%s"%(s,s)

When run, this program will print an exact copy of itself.

Blackbird





More information about the Python-list mailing list