[issue46410] TypeError when parsing regexp with unicode named character sequence escape

Matthew Barnett report at bugs.python.org
Tue Jan 18 10:52:03 EST 2022


Matthew Barnett <python at mrabarnett.plus.com> added the comment:

They're not supported in string literals either:

Python 3.10.1 (tags/v3.10.1:2cd268a, Dec  6 2021, 19:10:37) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> "\N{KEYCAP NUMBER SIGN}"
  File "<stdin>", line 1
    "\N{KEYCAP NUMBER SIGN}"
                            ^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 0-21: unknown Unicode character name

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46410>
_______________________________________


More information about the Python-bugs-list mailing list