Untitled
unknown
plain_text
a year ago
405 B
4
Indexable
#!/usr/bin/env python # -*- coding: utf-8 -*- class Toto(object): def bouh(self): print("bouh toto") def __getattribute__(self, name): if name == "bouh": Toto.bouh(self) return super().__getattribute__(name) class Tutu(Toto): def bouh(self): print("bouh Tutu") def main(): b = Tutu() b.bouh() if __name__ == "__main__": main()
Editor is loading...
Leave a Comment