Ezio Melotti added the comment:
This is not a bug, \U should be followed by 8 hex digits and it indicates a
Unicode codepoint:
>>> '\\u0065'.decode('unicode_escape')
u'e'
>>> '\\U00000065'.decode('unicode_escape')
u'e'
>>> '\\Upsilon'.decode('unicode_escape')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeDecodeError: 'unicodeescape' codec can't decode bytes in position 0-7:
end of string in escape sequence
>>> u'\Upsilon'
File "<stdin>", line 1
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in
position 0-7: end of string in escape sequence
>>> u'\U00000065'
u'e'
----------
nosy: +ezio.melotti
resolution: -> invalid
stage: -> committed/rejected
status: open -> closed
type: crash -> behavior
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue17850>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com