ur'foo' syntax under Python 3

Peter Otten __peter__ at web.de
Sat Feb 8 14:52:45 EST 2014


Lele Gaifax wrote:

> I'm using Python 3.3, and I was surprised to realize that it does not
> support the old Python 2 syntax ur"literal-raw-unicode-strings".
> 
> Is there any trick to write such literals in a Python2+3 compatible
> source?
> 
> Is there a rationale behind the invalid syntax or is it just a glitch?

This is intentional:

http://www.python.org/dev/peps/pep-0414/#exclusion-of-raw-unicode-literals




More information about the Python-list mailing list