[Tutor] Class inheiritance question
Brad Chandler
mbc2@netdoor.com
Fri, 29 Dec 2000 17:17:35 -0600
I have created a sub class called Positionrlgn of a base class called
Position. I've redefinded one of the functions successfully, but now I need
to redefine a variable. How do I redefine a value which is set in the
__init__ function.
For example, my base class starts like this:
class Position:
def __init__(self, dbrow):
self.currentsalary=dbrow[0]
my sub class starts like this:
class Positionrlgn(projectclass.Position):
#currentsalary needs to be redefined here.
Can I modify the __init__ function so that only the one value is altered and
the rest are left intact?