[Python-3000] A super() idea - no _getframe() involved

Guido van Rossum guido at python.org
Wed Apr 19 17:39:55 CEST 2006


On 4/19/06, Thomas Wouters <thomas at python.org> wrote:

[responding to some confusing text from me about super in a static method]

> That's not how it works (and that's good; refusing the temptation to guess,
> and what not :) super() cannot make any assumptions about the next class in
> the MRO, and since you don't *have* a class in a staticmethod, it has no way
> to find out. staticmethods just can't sensibly call 'their baseclass method'
> (unless they're really just "explicit classmethods", like __new__, but those
> best be real classmethods (even __new__ :))

Of course. I forgot that -- super is useless with a static method.
Whether static methods are useless is a matter of taste (I happen to
concur :-).

--
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-3000 mailing list