Message 77433 - Python tracker (original) (raw)

You convinced me. After all, if python interpreter does not complain about missing end-of-line and processes the unterminated line, getsource should report it.

Here is a patch that passes existing tests and adds a "NoEOF" test case.

I am adding 2.5.3 to the list of versions, but someone will have to lobby python-dev to make it happen.

Note that I've modernized the code a little bit by switching from a callback tokenizer to the newer token generator. Hopefully this will make it easier to review the code, but I can easily produce an old-style
patch as well.