compile() and comments
Terry Reedy
tjreedy at udel.edu
Tue Oct 14 19:02:00 EDT 2008
Steve Holden wrote:
> Ed Leafe wrote:
>> On Oct 13, 2008, at 8:35 AM, Fuzzyman wrote:
>>
>>> It is certainly an odd restriction, but the docs for compile [1] do
>>> explicitly state that the input must be newline terminated.
>>
>> Understood; what I found odd was that if the last
>> non-newline-terminated statement was *not* a comment, no error was thrown.
>>
> What if the last line is indented?
Unterminated last-line comments raise an exception indented or not. I
did not test 'regular' non-indented lines.
More information about the Python-list
mailing list