关于多重继承
class A(object):
def __init__(self, a):
print 'init A...'
self.a = a
class B(A):
def __init__(self, a):
super(B, self).__init__(a)
print 'init B...'
class C(A):
def __init__(self, a):
super(C, self).__init__(a)
print 'init C...'
class D(B, C):
def __init__(self, a):
super(D, self).__init__(a)
print 'init D...'
>>> d = D('d')
init A...
init C...
init B...
init D...
为什么init A只出现了一次,B, C都同时继承了A, D 继承了B, C, 正常我理解 init A ... 应该出现了两次才对,求指点