[Python-3000] auto-super()
Greg Ewing
greg.ewing at canterbury.ac.nz
Wed Apr 19 08:18:37 CEST 2006
Aahz wrote:
> But multiple inheritance with new-style classes is inherently diamond
> inheritance -- how do you propose to deal with that?
Yes, that's a bit of a problem. Or rather, it's not
really a problem, because object doesn't provide any
methods of its own, so having it at the top of every
class hierarchy doesn't cause any problems in practice.
But any mechanism that tried to enforce a ban on
diamond inheritance would need to treat it as a special
case.
I'm not really advocating an enforced ban, because there
are cases where it can be made to work with sufficient
care. But I do think it should be regarded as a do-it-
at-your-own-risk kind of thing, and not to be generally
encouraged.
--
Greg
More information about the Python-3000
mailing list