[issue10093] Warn when files are not explicitly closed
Marc-Andre Lemburg
report at bugs.python.org
Sat Oct 23 00:13:57 CEST 2010
Marc-Andre Lemburg <mal at egenix.com> added the comment:
I wonder why you think a warning is needed if files aren't closed explicitly. The fact that they get closed on garbage collection is one of the nice features of Python and has made programming easy for years.
Explicitly having to close files may have some benefits w/r to resource management, but in most cases is not needed. I disagree that we should discourage not explicitly closing files. After all, this is Python, not C.
----------
nosy: +lemburg
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10093>
_______________________________________
More information about the Python-bugs-list
mailing list