[Python-Dev] python and super
Greg Ewing
greg.ewing at canterbury.ac.nz
Sat Apr 16 01:56:08 CEST 2011
Michael Foord wrote:
> But you have to be aware that
> because of the semantics of super, not calling up to your parents
> basically prevents those methods being used in the presence of multiple
> inheritance.
No, it prevents them being used in the presence of super().
Multiple inheritance is still possible the old-fashioned way
using explicit upcalls as long as the classes are sufficiently
independent.
If they're *not* sufficiently independent, and haven't been
specifically designed to cooperate with each other, attempting
to make them cooperate automatically is as likely to do harm
as good.
--
Greg
More information about the Python-Dev
mailing list