Good day,
I have programmed a base class for an environment I have with no problem, but when it comes to referencing the base class's constructor in the derived class's constructor I have been getting errors: *TypeError: Error when calling the metaclass bases* * module.__init__() takes at most 2 arguments (3 given)* Here's how my base class' constructor looks like (position = [x, y, z]): *class Obstacle:* * def __init__(self,position):* * self.position = position* Here's how my derived class's constructor looks like *class Cylinder(Obstacle):* * def __init__(self,position, height, radius):* * super(Obstacle,self).__init__(position)* I have no idea where the 3 given arguments are being taken from. I have modified the code on the super line just in case I missed something but that has not changed a thing. I have read that in Python you may be able to double reference, but there are no other classes interfacing the base and derived class. If anyone has had some prior experience with this I'd appreciate your input. Regards, Jorge
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor