原因是
super()只能在新型类上运行,这在2.x系列中意味着从
object:
>>> class X(object): def a(self): print 'a'>>> class Y(X): def a(self): super(Y, self).a() print 'b'>>> c = Y()>>> c.a()ab

原因是
super()只能在新型类上运行,这在2.x系列中意味着从
object:
>>> class X(object): def a(self): print 'a'>>> class Y(X): def a(self): super(Y, self).a() print 'b'>>> c = Y()>>> c.a()ab