> Yes, I think I will do something like that, although... I really do > not understand why \x5c is not interpreted in a raw string but \u005c > is interpreted in a unicode raw string... is, well, not elegant. Raw > should be raw...
Right. IMO, this is just a plain design mistake in the Python Unicode handling. Unfortunately, there was discussion about this specific issue in the past, and the proponent of the status quo always defended it, with the rationale (IIUC) that a) without that, you can't put arbitrary Unicode characters into a string, and b) the semantics of \u in Java and C is so that \u gets processed even before tokenization even starts, and it should be the same in Python. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list