super() doesn't get superclass

Robin Becker robin at reportlab.com
Wed Sep 19 08:44:54 EDT 2007


Michele Simionato wrote:
....... interesting stuff ommitted

super seems to return an object of type super, but I cannot seem to find any 
documention on this type except for 3.4.2.3

"Super Binding
If a is an instance of super, then the binding super(B, obj).m() searches 
obj.__class__.__mro__ for the base class A immediately preceding B and then 
invokes the descriptor with the call: A.__dict__['m'].__get__(obj, A). "


-- 
Robin Becker




More information about the Python-list mailing list