[issue36919] Exception from 'compile' reports a newline char not present in input

Anthony Sottile report at bugs.python.org
Sat May 18 23:30:27 EDT 2019


Anthony Sottile <asottile at umich.edu> added the comment:

still not able to answer the why, but at least I can answer the what here:

https://github.com/python/cpython/blob/f665b96e92a6a6943e312e2c606f348db95939ab/Parser/tokenizer.c#L984-L987

cpython adds a newline during tokenization if the file does not end in a newline

----------
nosy: +Anthony Sottile

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36919>
_______________________________________


More information about the Python-bugs-list mailing list