Unfortunately, with the change to put the `.eof` call first, I think this is not a good example, AIUI one should just call `.read_line()` and a `None` indicates EOF, rather than checking it explicitly here.

(This is why I put the `.eof()` call after the `.read_line` call before.)