Re:Crafting Interpreters: Superclasses
by blattimwind on Thursday March 19, 2020 @09:46AM
(#22627421)
I'm not sure that's possible, because you could only work with type(self), and that breaks MRO traversal. (A chain of super().x() calls in a hierarchy like A->B->C would always call the first parent class, because it has no way to tell >where< in the hierarchy it is. That's the reason why the class argument is required.)
I think that would need an entirely differently designed mechanism and can't be bolted on.
I think that would need an entirely differently designed mechanism and can't be bolted on.