Created
October 31, 2019 11:10
-
-
Save Tony363/d9fc2105368cab7bceea9e1062c118c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class A: | |
def test(self): | |
print("test of A called") | |
class B(A): | |
def test(self): | |
print('test of B called') | |
super().test() | |
class C(A): | |
def test(self): | |
print("test of C called") | |
super().test() | |
class D(B,C): | |
def test2(self): | |
print("test of D called") | |
obj = D() | |
print(obj.test()) | |
print(obj.test2()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment