from:http://www.xinotes.org/notes/note/517/
For old-style classes: BaseClassName.methodname(self, arguments)
>>> class A: ... def hello(self): ... print 'a' ... >>> A().hello() a >>> class C(A): ... def hello(self): ... A.hello(self) ... print 'c' ... >>> C().hello() a c
For new-style class (any class which inherits fromobject
):super(ClassName, self).method(args)
>>> class M(object): ... def hello(self): ... print 'm' ... >>> class N(M): ... def hello(self): ... super(N, self).hello() ... print 'n' ... >>> N().hello() m n