Closed as not planned
Closed as not planned
Description
Bug report
Bug description:
>>> codecs.decode('\u{0041}',encoding='unicode-escape')
File "<python-input-2>", line 1
codecs.decode('\u{0041}',encoding='unicode-escape')
^^^^^^^^^^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 0-1: truncated \uXXXX escape
>>> codecs.decode('\u0041',encoding='unicode-escape')
'A'
>>> '\u{0041}'
File "<python-input-4>", line 1
'\u{0041}'
^^^^^^^^^^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 0-1: truncated \uXXXX escape
>>> '\u0041'
'A'I'm not sure when the \u{xxx} escape was introduced to the world, but it should be recognized by codecs.decode and the Python interpreter. The above sample was run on Python 3.13.1 on Windows.
CPython versions tested on:
3.13
Operating systems tested on:
No response
Metadata
Metadata
Assignees
Projects
Status
Done