Martin v. Löwis added the comment:

I can reproduce the problem. I started debugging it; the issue is that, after 
reading the two comment lines (and detecting the source encoding), 
fileio_readinto gets called, which calls read(), and read() returns 17 (bytes 
read), with are

"-\n\nprint('test')"

So for some reason, the - is not consumed yet, even though it was previously 
read out of the file descriptor.

----------
nosy: +loewis

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

Reply via email to