[issue17852] Built-in module _io can loose data from buffered files at exit

Serhiy Storchaka report at bugs.python.org
Wed Nov 19 17:38:00 CET 2014


Serhiy Storchaka added the comment:

I'm +1 on closing this. Agree with Charles-François that it's never been guaranteed by the Python specification. Pythonic way to work with files is to use the "with" statement, or, if you need long living file stream, careful close files in the "finally" block or in __exit__ method of some class which is used as context manager. Non-observance of this rule can be considered as a bug (see issue22831).

----------

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


More information about the Python-bugs-list mailing list