[Python-Dev] What does a double coding cookie mean?

Serhiy Storchaka storchaka at gmail.com
Thu Mar 17 16:09:14 EDT 2016

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.

More information about the Python-Dev mailing list