Antoine Pitrou <[email protected]> added the comment:
Ok, I get it, you want f.close() to always succeed, even if the
underlying file descriptor has already been closed.
Well, I so no reason to introduce a helper anyway, the following four
lines are much more readable and explicit:
try:
f.close()
except IOError:
pass
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue5395>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com