using super

Jean-Michel Pichavant jeanmichel at sequans.com
Mon Jan 18 12:54:06 EST 2010


>>> class SubClass(Base):
>>>     colour = "Red"
>>>     def parrot(self):
>>>         """docstring for Subclass"""
>>>         return super(Subclass, self).parrot()
I'm not a big fan of super, but I'm still wondering if

 >>> return super(self.__class__, self).parrot()

would have made it.

What if Subclass has more than one base class ?


JM




More information about the Python-list mailing list