Builtn super() function. How to use it with multiple inheritance? And why should I use it at all?
steve-REMOVE-THIS at cybersource.com.au
Mon Aug 2 11:45:59 CEST 2010
On Sun, 01 Aug 2010 23:15:11 -0700, Michele Simionato wrote:
> On Jul 31, 5:08 am, Steven D'Aprano <st... at REMOVE-THIS-
> cybersource.com.au> wrote:
>> I have read Michelle Simionato's articles on super in Python.
> One "l" please! I am a man! ;-)
My apologies. You'd think I would know the difference between Michele and
> Still I believe that super is a red herring and that you should really
> start thinking: what advantages did
> multiple inheritance *really* bring into my code? Could have I done
> without? And what would have happen?
> These are the relevant question, not the exact meaning of super in hairy
Yes, these are very good points. It's always worth looking at
alternatives to subclassing in the first place. Far too often it's not
just the first idiom people think of, but the *only* idiom they think of.
More information about the Python-list