Brian Quinlan <br...@sweetapp.com> added the comment: >> - FileIO is implemented in Python in _pyio.py so that it can have the >> same base class as the other Python-implemented files classes
> Is it really necessary (e.g. to pass the tests)? It is necessary to make MI work. With out it the inheritance graph looks like this (using _pyio): io.IOBase _pyio.IOBase | | io.FileIO MyMixin | | \ / \ / \ / MyClass If you call MyClass.flush() with this hierarchy then it will propagate to io.IOBase. Since io.IOBase doesn't call super().flush() in its flush implementation (because it has no super class), flush propagation would stop and MyMixin.flush wouldn't be called. There are other ways you could solve this, of course, like getting io.IOBase to call super().flush and ignore any errors that it gets. But it seems like this is the right way to fix this problem anyway - as a user, I would expect isinstance(FileIO(...), IOBase) but that is not currently the case with _pyio. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5700> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com