scott wrote: > can someone tell me, how to use a class like that* (or "simulate" more > than 1 constructor) : > #-- > class myPointClass: > def __init__(self, x=0, y=0): > self.x = x > self.y = y > def __init__(self, x=0, y=0, z=0): > self.__init__(self, x, y) > self.z = z > #--
Well for the example you used, multiple constructors are not needed. This will get you the same result as what I imagine you wanted the first example to do: class myPointClass: def __init__(self, x=0, y=0, z=0): self.x = x self.y = y self.z = z -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list