> Nowadays the best practice for invoking a method from all superclasses
> (yes, multiple inheritance) is this:
> 
> class SubClass(BaseClass):
>     def __init__(self, t, *args, **kw):
>         super(SubClass, self).__init__(*args, **kw)
>         # do something with t
> 
> That way you let Python decide which superclasses your SubClass has,
> instead of hard-coding it in several places.
>

Excellent.  Thank you.  This seems far more logical.

Is there a proper way to handle the case when SubClass() is called using 
positional arguments, and you do not desire "t" to be at the beginning?

Thanks again,
:)





      
____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to