[Python-Dev] python and super (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Sat Apr 16 01:56:08 CEST 2011
- Previous message: [Python-Dev] python and super
- Next message: [Python-Dev] python and super
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: [Python-Dev] python and super
- Next message: [Python-Dev] python and super
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]