Martin Panter added the comment: I think I have often passed delete=False because of the documented deficiency with Windows (see Issue 14243). Depending on the outcome of that issue, allowing for deletion after close() might be useful too.
BTW, monkey-patching __del__() probably won’t work if you only set an attribute on the “f” instance, instead of modifying the class itself. See <file:///home/proj/python/cpython/Doc/build/html/reference/datamodel.html#special-method-lookup>. ---------- nosy: +vadmium type: -> enhancement _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23755> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com