r'\' - python parser bug?

Konstantin Veretennicov kveretennicov at yahoo.com
Fri May 28 02:46:07 EDT 2004


Many thanks to everyone for enlightening. Now i can see the reasons
behind "no odd number of trailing backslashes" decision.
Maybe they deserve to be appended to FAQ section on raw strings?

Interestingly, C# did it the other way. Trailing backslashes in
verbatim (raw) strings are allowed, but quotes are not:

@"\"   // ok
@"\""  // error, unterminated string literal

For me, personally, trailing backslashes aren't as important as quotes.
Python wins again :)

- kv



More information about the Python-list mailing list