Ammar Askar ammar@ammaraskar.com added the comment:
Relevant bit of the parser that emits a fake newline at the end of the file if not present: https://github.com/python/cpython/blob/master/Parser/tokenizer.c#L1059-L1069
----------
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue33766 _______________________________________