> > Yep...as documented[1], "even a raw string cannot end in an odd number > > of backslashes". > > So how do you explain this? > > >>> r'a\'b' > "a\\'b"
That doesn't "end in an odd number of backslashes." Python is __repr__esenting a raw string as a "regular" string. Literally they are equivalent: >>> a = r'a\'b' >>> b = "a\\'b" >>> a "a\\'b" >>> b "a\\'b" >>> print a a\'b >>> print b a\'b >>> a == b True -- http://mail.python.org/mailman/listinfo/python-list