Python's driving me mad. Invalid token?

Greg Ewing see_reply_address at something.invalid
Sun Oct 20 21:06:20 EDT 2002


Paul.Casteels at ua.ac.be wrote:

> 
> \" seems to be treate as one character, r'\' also does not work. 
> You will have to use r'\\'. This is strange, because r'\a' does work as
> expected.


Even in a raw string, backslashes still escape quote
characters. A consequence of this is that a raw string
can't end in an odd number of backslashes. Which is
annoying, but we seem to be stuck with it.

-- 
Greg Ewing, Computer Science Dept,
University of Canterbury,	
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg




More information about the Python-list mailing list