[Python-Dev] Possible py3k io wierdness (original) (raw)

Brian Quinlan brian at sweetapp.com
Sun Apr 12 12:49:37 CEST 2009


I've added a new proposed patch to: http://bugs.python.org/issue5700

The idea is:

On nice side effect is that inheritance is a lot easier and MI works as expected i.e.

class DebugClass(IOBase): def flush(self): print() super().flush() def _close(self): print( super()._close()

class MyClass(FileIO, DebugClass): # whatever order makes sense ...

m = MyClass(...) m.close()

Will call:

IOBase.close()

DebugClass.flush() # FileIO has no .flush method

IOBase.flush()

FileIO._close()

DebugClass._close()

IOBase._close()

Cheers, Brian



More information about the Python-Dev mailing list