[Python-Dev] \u and \U escapes in raw unicode string literals

Paul Moore p.f.moore at gmail.com
Thu May 10 20:53:38 CEST 2007


On 10/05/07, Guido van Rossum <guido at python.org> wrote:
> I just discovered that, in all versions of Python as far back as I
> have access to (2.0), \uXXXX escapes are interpreted inside raw
> unicode strings. Thus:
[...]
> Does anyone remember why it is done this way? The reference manual
> describes this behavior, but doesn't give an explanation:

My memory is so dim as to be more speculation than anything else, but
I suspect it's simply because there's no other way of including
characters outside the ASCII range in a raw string.

Paul.


More information about the Python-Dev mailing list