-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed
Labels
3.10only security fixesonly security fixes3.11only security fixesonly security fixes3.12only security fixesonly security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
b"Ā"👉 python test.py
File "/test.py", line 1
b"Ā"
^
SyntaxError: bytes can only contain ASCII literal characters
Here the caret is pointing to blackspace after the code
So each non-ASCII character is adding more incorrect offset:
👉 $c:temp = "b'ĀĀĀĀĀĀĀĀ'"
👉 py temp
File "C:\temp", line 1
b'ĀĀĀĀĀĀĀĀ'
^
Expected
👉 python test.py
File "/test.py", line 1
b"Ā"
^
SyntaxError: bytes can only contain ASCII literal characters
Linked PRs
DetachHead and arhadthedev
Metadata
Metadata
Assignees
Labels
3.10only security fixesonly security fixes3.11only security fixesonly security fixes3.12only security fixesonly security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error