[issue5700] io.FileIO calls flush() after file closed

Serhiy Storchaka report at bugs.python.org
Thu Oct 2 18:00:50 CEST 2014


Serhiy Storchaka added the comment:

There is complete implementation of FileIO in pure Python in issue21859. It is free from this bug.

>>> import _pyio as io
>>> class MyIO(io.FileIO):
...     def flush(self):
...             print('closed:', self.closed)
... 
>>> f = MyIO('test.out', 'wb')
>>> f.close()
closed: False

----------
nosy: +serhiy.storchaka

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


More information about the Python-bugs-list mailing list