March 30, 2015
1:35 a.m.
If the final resolution is "we don't need this in the library", that's fine - I agree that the proposal is trivial and doesn't gain much. OTOH the contextlib.closing can also be said to be a simple exercise, because its implementation is 22 lines long and it's equivalent to @contextmanager def closing(thing): try: yield thing finally: thing.close() (from the docs)