super()在新样式类中返回类似父对象的对象:
class A(object): def __init__(self): print("world")class B(A): def __init__(self): print("hello") super(B, self).__init__()B()
super()在新样式类中返回类似父对象的对象:
class A(object): def __init__(self): print("world")class B(A): def __init__(self): print("hello") super(B, self).__init__()B()