Possible Duplicate:
Usage of Python 3 super()
In the documentation for Python 3.2 it says;
If the second argument is omitted, the super object returned is unbound
In my understanding, unbound (as in 'unbound-to-instance') object is what's returned from super(class, class). So, what's meant by 'unbound' in super(class)? How do you bind it?
class Base:
def printme(self): print("I'm base")
class Derived(Base):
def printme(self): print("I'm derived")
class Derived2(Derived):
def printme(self):
super().printme()
# next-in-mro bound-to-self method
super(Derived, self).printme()
# beyond-Derived-in-mro bound-to-self method
super(Derived, Derived2).printme(self)
# beyond-Derived-in-mro-of-Derived2 unbound method
super(Derived2).printme
# WTF is this? There's not even a printme attribute in it
Derived2().printme()