[Python-Dev] Problems with the new super() (original) (raw)

Armin Ronacher armin.ronacher at active-4.com
Thu May 1 10:42:19 CEST 2008


Hi,

Guido van Rossum <guido python.org> writes:

The staticmethod thing isn't new; that's also the case in 2.x. staticmethod hasn't changed, method has. In the past Class.method gave you a unbound method, now you get a function back as if it was a static method.

The super() thing is a case of practicality beats purity. Note that you pay a small but measurable cost for the implicit class (it's implemented as a "cell variable", the same mechanism used for nested scopes) so we wouldn't want to introduce it unless it is used. I do agree that super() is a lot easier to work with than regular way to call it. But the fact that it breaks if i do _super = super or that it's impossible to emulate it from within Python.

Regards, Armin



More information about the Python-Dev mailing list