Classes, Inheritance - Stupid lazy question
gresham at mediavisual.com
Wed Apr 12 10:03:41 CEST 2000
This is stupid and lazy of me, I have looked through the docs, but I think
my brain is fried today, I just couldn't see it ... when I have a sub-class
with an overridden function/method how do I call the same function/method in
the parent ?
self.name = name
print 'You are fired %s' % self.name
self.name = name # <---- ?????
self.april_pay = 0
print 'Here's a box, collect the things from your desk'
lazy.fired(self) # <--- ??????
The thing I'm just not clear about is the __init__ in my subclass, I want to
do an additional initialisation, without having to the whole init from the
parent class. I think what I am doing is kindof close ... but just want to
know the real way to do this !!
Sorry I've just really lost the plot today!
More information about the Python-list