S
Steven D'Aprano
On 06/23/2013 11:50 AM, Steven D'Aprano wrote:
Well, I would call it super(). Trouble is, that is not all that super()
does. Going back to Ian's example:
Notice how Base1 calls super(), but depending on circumstances, it could
by Base2 that super() calls. Surely you are not suggesting that Base2
is therefore an ancestor of Base1?
No. But "the current object" is not Base1, but an instance of Derived,
and Base2 *is* an ancestor of Derived. Perhaps if I had said "self"
instead of current object, you wouldn't have made this error. If so, I
apologise for confusing you.
When your inheritance chain begins from an instance of Base1, Base2
methods will never be called. It is only when the chain begins from
Derived that Base2 may be called, which is exactly as it should be.
It's too late to change the name now, but pretending there is no good
and valid reason for confusion doesn't help.
The confusion is not with the name, or what super does, but with
inheritance itself.