Raw Strings!
Greg Ewing
greg.ewing at compaq.com
Wed Jun 16 18:22:30 EDT 1999
"Magnus L. Hetland" wrote:
>
> The point with raw strings is that backslashes can be written
> out without being escaped.
Be warned that raw strings are not *quite* completely
raw! For example,
s = r"\abc\def\"
is a syntax error. On the other hand,
s = r"\abc\def\\"
is not. I'll leave you with the fun of trying to
guess what the resulting string contains...
They-should-really-be-called-rare-strings,
Greg
More information about the Python-list
mailing list