S
Scott David Daniels
It could "just do the right thing", but not as a function, only as aChris said:... I can't find any
discussion of why super needs the name of the class as an argument.
super(self).method() seems like super could just do the right
thing...
compiler magic thingamiebob. When methods are being translated, they
are ordinary function definitions, and the class for which they will
become a method does not exist. By including the name of the class
itself, rather than the name of the (or a) super class, super can search
in the "mro" for the class, and find the next class in that order after
the given class. "super" seems to me to have the "explicit is better
than implicit" flavor without forcing you to know the whole inheritance
structure.
-Scott David Daniels
(e-mail address removed)