Classes, Inheritance - Stupid lazy question
Janko Hauser
jhauser at ifm.uni-kiel.de
Wed Apr 12 04:52:29 EDT 2000
I think this will do it
class lazy:
def __init__(self, name):
self.name = name
def fired(self):
print 'You are fired %s' % self.name
class paul(lazy):
def __init__(self, name):
self.name = name # <---- ?????
self.april_pay = 0
def fired(self):
print "Here's a box, collect the things from your desk"
self.__class__.__bases__[0].fired(self)
te = paul('myname')
te.fired()
HTH
__Janko
--
Institut fuer Meereskunde phone: 49-431-597 3989
Dept. Theoretical Oceanography fax : 49-431-565876
Duesternbrooker Weg 20 email: jhauser at ifm.uni-kiel.de
24105 Kiel, Germany
More information about the Python-list
mailing list