class Person(object):#新式类 superclass Person:#经典类 Person.__init__#多继承时,顺序的区别--新式类和经典类:在Python3.X中广度查找;在Python2.X中新式类采用广度查找,经典类采用深度查找class A(object): pass # def __init__(self): # self.n = "A"class B(A): pass # def __init__(self): # self.n = "B"class C(A): def __init__(self): self.n = "C"class D(B,C): pass # def __init__(self): # self.n = "D"d = D()print(d.n)