Circular Class Logic
greg
greg at cosc.canterbury.ac.nz
Fri Mar 16 20:43:13 EDT 2007
Paul McGuire wrote:
> I always assumed that super, being added to
> the language later, represented some form of improvement, but this may
> not be 100% correct.
It's not -- super is not a replacement for explicit
inherited method calls. It does something different,
and has different use cases.
It's usually not appropriate for __init__ calls,
because an __init__ method generally doesn't have
the same signature as that of its base class(es).
You're better off calling the base __init__
directly, then you know exactly which method
you're calling and what signature it has.
--
Greg
More information about the Python-list
mailing list