I don't quite understand the interplay of the two different __init__ methods 
when trying to extend a class.  Below is my hack attempt at doing so...

class ship(object):
    def __init__(self,l=0,b=0,t=0,name=''):
        self.l = l
        self.b = b
        self.t = t
        self.name<http://self.name> = name
    def make_it_deeper(self,t):
        self.t = self.t - t

class fast_ship(ship):
    def __init__(self,speed = 0):
        self.speed = speed

my_ship = fast_ship(l = 100,b = 50, t = 10, name = 'cutter',speed = 10)


If anyone would be so kind as to show me how to get the intended effect that 
I've hinted at, I would be most grateful,

Ben

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to