class_super_multinherit.py 234 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
# test super with multiple inheritance

class A:
    def foo(self):
        print('A.foo')

class B:
    def foo(self):
        print('B.foo')

class C(A, B):
    def foo(self):
        print('C.foo')
        super().foo()

C().foo()