Andrew Barnert added the comment: It may be pretty hard to come up with a good example for closing in the stdlib that shouldn't just be turned into a context manager…
There are some types where using it in a with statement is sensible, but unusual enough that you might want to make it explicit (maybe logging.Handler?), but does that make a good example? ---------- nosy: +abarnert _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22755> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com