On 17.03.16 21:11, Guido van Rossum wrote:
This will raise SyntaxError if the encoding is unknown. That needs to
be caught in mypy's case and then it needs to get the line number from
the exception.

Good point. "lineno" and "offset" attributes of SyntaxError is set to None by tokenize.detect_encoding() and to 0 by CPython interpreter. They should be set to useful values.


_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to