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

Brian Quinlan report at bugs.python.org
Sun Apr 12 12:33:09 CEST 2009


Brian Quinlan <brian at sweetapp.com> added the comment:

cooperation.diff:
- change the close method to call .flush() and then ._close()
- only IOBase implements close() (though a subclass can override close
  without causing problems - so long as it calls super().close())
- .flush() invokes super().flush()
- ._close() invokes super()._close()
- FileIO is implemented in Python in _pyio.py so that it can have the
  same base class as the other Python-implemented files classes
- tests verify that .flush() is not called after the file is closed
- tests verify that ._close()/.flush() calls move correctly are 
  propagated correctly

----------

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


More information about the Python-bugs-list mailing list