Calling baseclass method from a derivated class

Yannick Patois patois at calvix.org
Tue Feb 26 08:21:11 EST 2002


Hello,

I would like to know how I can call a method defined in a base class 
from a derivated class that overloaded it.

Example:

class toto1:
   def titi(self):
        print "titi1"

class toto2(toto1):
   def titi(self):
        print "titi2"

And now, if I create:
item=toto2()

I can do:
item.titi() # -> "titi2"

But what to get the first 'titi' method to be called ?

Thanks for any help,

	Yannick

-- 
 _/ Yannick Patois \___________________________________________________
| web :http://feelingsurfer.net/garp/ | CALVIX ! Le LUG de CAEN        |
| email : patois at calvix.org           | web : http://www.calvix.org/   |
| Petit Portail en Bois, Modeste et Génial : http://www.rezo.net/      |



More information about the Python-list mailing list