>>>>> Terry Reedy <[email protected]> (TR) wrote: >TR> Peter Otten wrote: >>>>> Will your program handle empty lines of input correctly? >>>> Strangely enough, it seems to do so, but why? >>> >>> Because there aren't any. When you read lines from a file there will >>> always be at least the newline character. Otherwise it would indeed fail:
>TR> Except possibly for the last line. But then that line wouldn't be empty either. If there is an empty line not terminated by a newline after the last newline, then that is called 'end-of-file' :=) -- Piet van Oostrum <[email protected]> URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4] Private email: [email protected] -- http://mail.python.org/mailman/listinfo/python-list
