class A(object): def __init__(self,a): print 'init A...' self.a = a print self.aclass B(A): def __init__(self,a): print 'init B...' super(B,self).__init__(a) print self.aclass C(A): def __init__(self,a): print 'init C...' super(C,self).__init__(a)class D(B,C): def __init__(self,a): print 'init D...' super(D,self).__init__(a) print self.aa = A('a')b = B('b')为什么实例化对象a输出的结果也是b??? |