[Tutor] inheritance
Ike Hall
hall@nhn.ou.edu
Tue Nov 12 16:27:00 2002
Hi all,
a quick question I hope someone can answer for me.
suppose I have some class:
class blah:
def __init__(self,blah, blah, blah):
...stuff...
def method(self,yak,yak,yak):
...more stuff...
....more methods...
then I define some other class to inherit this class,
class thbbt(blah):
def __init__(self,la,la,la):
...different stuff than in blah.__init__...
def method(self,yakkity,yak):
...different stuff than in blah.method...
My question then is this: when I call thbbt.__init__ or thbbt.method, what
happens? I guess what Im trying to say is that I do not really understand
inheritance all that well, especially if some methods that are to be
inherited are "written over" in the class definition. Can anyone help me?
Ike