[issue20608] 'SyntaxError: invalid token' is unfriendly

Marius Gedminas report at bugs.python.org
Sat Feb 15 13:49:29 CET 2014


Marius Gedminas added the comment:

Here's version 2 of the patch:
- spelling error fixed
- 0b2, 0o8, 0xg, 0e-x show the expected error at the expected place
- 0b02, 0o08, 0x0g, 0e-0x continue produce a generic "syntax error" because the tokenizer thinks these are a pair of valid tokens (0b0 followed by 2 etc.), and the error comes from the parser

----------
Added file: http://bugs.python.org/file34091/better-errors-v2.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20608>
_______________________________________


More information about the Python-bugs-list mailing list