super
super(type, object-or-type)
The true meaning of
super and its argument is:Lineriz(by
mro) inherent architecture from object-or-type then get the class right after type.For example, if __mro__ of object-or-type is D -> B -> C -> A -> object and the value of type is B, then super() searches C.
A typical super call:
class C(B):
def method(self, arg):
super().method(arg) # This does the same thing as:
# super(C, self).method(arg)
Note
The default argument of
typeis class name,ChereThe default argument of
object-or_typeis first argument of calling method,selfhere.
Consult the PEP3135 New Super for more.