Session08 - Generators, Decorators, Context Managers, Iterators

I do like that you remember to close the file here, though if you are expecting an open file handle as suggested above, it would be better to leave it open, allowing the user to close this file themselves.  Given your implementation choice, I'd say this was the right thing to do.