Jon Ribbens <[EMAIL PROTECTED]> wrote: > I presume there was originally some reason for this bizarre behaviour > - it'd be interesting to know what it is/was, if anyone knows? > See the FAQ for the explanation:
http://www.python.org/doc/faq/general/#why-can-t-raw-strings-r-strings-end-with-a-backslash The idea is that if you use raw strings for regular expressions you can write things like: pattern = r'[\'"]' if the raw string simply ignored the backslash altogether it would be much harder to write regular expressions that contain both sorts of quotes. -- http://mail.python.org/mailman/listinfo/python-list