[docs] [issue22755] contextlib.closing documentation should use a new example

Andrew Barnert report at bugs.python.org
Wed Oct 29 00:02:16 CET 2014


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 <report at bugs.python.org>
<http://bugs.python.org/issue22755>
_______________________________________


More information about the docs mailing list