Raw String Question

andrew cooke andrew at acooke.org
Thu Mar 12 20:30:44 EDT 2009


MRAB wrote:
[...]
> The other special case is with \u in a Unicode string:
>
>  >>> ur"\u0041"
> u'A'

this isn't true for 3.0:

>>> r"\u0041"
'\\u0041'

(there's no "u" because it's a string, not a bytes literal)

and as far as i can tell, that's correct behaviour according to the docs.

andrew




More information about the Python-list mailing list