Wesley Brooks wrote: > Dear Users, > > I would like a class to inherit the methods from wxVTKRenderWindow, > but to add a few lines of code to __init__ . I would prefer not to > copy the whole init method from the inherited class into the > inheriting class. What is the best approach for this? I guess that if > I have an init in the inheriting class it would overide the init in > the inherited class?
Yes, your __init__() will override the base class __init__(). To include the base class functionality, just call the base class __init__() from your __init__(). The syntax for this is a little different from the usual method call; in your __init__() include this call: wxVTKRenderWindow.__init__(self, args) where args is whatever argument list you want to pass to the base class __init__(). _______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
