[issue11228] raw unicode strings interpret \u and \U (but not \n, \xHH, ...)

2011-02-16 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: len(ur'\u') == len(u'\u') == 1 len(ur'\U0010') == len(u'\U0010') == 1 but len(ur'\n'), len(u'\n') (2, 1) len(ur'\x00'), len(u'\x00') (4, 1) \u and \U should not be interpreted in raw Unicode strings.

[issue11228] raw unicode strings interpret \u and \U (but not \n, \xHH, ...)

2011-02-16 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This has changed in python 3, and is even documented: http://docs.python.org/dev/py3k/whatsnew/3.0.html#text-vs-data-instead-of-unicode-vs-8-bit (6th bullet) Python 2.x could not be changed, for compatibility reasons. --

[issue11228] raw unicode strings interpret \u and \U (but not \n, \xHH, ...)

2011-02-16 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Python 2.x could not be changed, for compatibility reasons. Well, it is not a bug because it is documented! When an 'r' or 'R' prefix is used in conjunction with a 'u' or 'U' prefix, then the \u and \U escape