Closed pablogsal closed 3 years ago
Seems like unicode escapes doesn't work at all
(.venv) (3.9.5) [ 12:25ÖÖ ] [ isidentical@msi:~/projects/cpython(test-fixes✅) ]
$ ./python 3ms
Python 3.11.0a0 (heads/fstring-grammar-dirty:81ed1ec640, Oct 26 2021, 00:23:59) [GCC 10.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> f"\N{BULLET}"
'\\N{BULLET}'
>>>
(.venv) (3.9.5) [ 12:26ÖÖ ] [ isidentical@msi:~/projects/cpython(test-fixes✅) ]
$ python 6,978s
Python 3.9.5 (default, May 11 2021, 08:20:37)
[GCC 10.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> f"\N{BULLET}"
'•'
>>>
In
test_fstring
, the testtest_misformed_unicode_character_name
is failing with:ERROR: test_misformed_unicode_character_name (test.test_fstring.TestCase) (str="'\N{'")\n---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pablogsal/github/python/f-string-grammar/Lib/test/test_fstring.py", line 33, in assertAllRaise eval(str) ^^^^^^^^^ UnicodeDecodeError: 'unicodeescape' codec can't decode bytes in position 0-2: malformed \N character escape