Marius Gedminas added the comment:

Oh, hey, PEP 3127 actually asks for a better error message than "invalid token" 
for this case: 
http://www.python.org/dev/peps/pep-3127/#tokenizer-exception-handling

So here's a tentative patch to test the waters.  I still haven't figured out 
how to write tests for it (is Lib/test/test_tokenize.py the right place for 
that?), and I haven't manually tested it either, because building CPython tip 
fails for me with a strange link error about 
_PyTraceMalloc_Init/_PyTraceMalloc_Fini.

If there's some documentation I should read about submitting CPython patches, 
or some IRC channel I should join, please tell me!

----------
keywords: +patch
Added file: http://bugs.python.org/file34090/better-errors.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20608>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to