我试图理解Python中的类继承并创建了下面的继承,
问题:当我继承B类并调用方法A时,它会打印“Im方法B”..它不会调用A类的methodA吗?
class A(object):
def methodA(self):
print 'Im method A'
class B(A):
def methodA(self):
print 'Im method B'
class C(A):
def methodA(self):
print 'Im method C'
class D(B,C):
def methodA(self):
print 'Im method D'
def main():
x = D()
x.methodA()