I guess I am confused about when when escape characters are are interpersonal as escape characters, and escape characters are not treated as escape characters.
Sometimes escape characters in regular strings are treated as escape characters, sometimes not. Same seems to go for raw strings. So how do I know? IMO: '\' characters in raw strings should not be given any special meaning. That would also solve the common problem of r'c:\whatever\' not working in python. But I digress. To me this does not seem right. r'\n' should not equal '\n' >>> s = 'x\nx' >>> a = re.sub('\n', 'x', s) >>> a 'xxx' >>> a = re.sub(r'\n', 'x', s) >>> a 'xxx' >>> -- http://mail.python.org/mailman/listinfo/python-list