0
class MyClass(Class1, Class2):
pass
父母雙方有一個getImage
方法。Python多繼承 - 調用一個類的方法,但哪一個?
thing = MyClass()
thing.getImage() #I want to call Class1's
thing.getImage() #I want to call Class2's
哪個getImage
被調用?我如何指定要撥打哪一個?
看到這個問題:http://stackoverflow.com/questions/1848474/method-resolution-order-mro-in-new-style-python-classes –