[issue11767] Maildir iterator leaks file descriptors by default

R. David Murray report at bugs.python.org
Thu Apr 7 22:49:38 CEST 2011


R. David Murray <rdmurray at bitdance.com> added the comment:

Ah, that's exactly why I suggested using the 'closing' context manager from contextlib.  That context manager returns the object passed to it, and then when its __exit__ method is called, calls the close method of that object that was passed to it.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11767>
_______________________________________


More information about the Python-bugs-list mailing list