[issue27582] Mispositioned SyntaxError caret for unknown code points
Stephen J. Turnbull
report at bugs.python.org
Thu Jul 21 13:15:04 EDT 2016
Stephen J. Turnbull added the comment:
I still think the easiest thing to do would be to make all non-ASCII characters instances of "invalid_character_token", self-delimiting in the same way that operators are. That would automatically point to exactly the right place in the token stream, and requires zero changes to the error handling code.
I don't have time to look at the code, but I suspect that you could handle this exactly the same way that ? and $ are handled, and maybe even use the same token type.
----------
nosy: +sjt
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27582>
_______________________________________
More information about the Python-bugs-list
mailing list