[Python-3000] auto-super()

Michael Urman murman at gmail.com
Tue Apr 18 15:29:49 CEST 2006


On 4/18/06, Guido van Rossum <guido at python.org> wrote:
> Hardly the same mechanism; __private is done by low-level name
> mangling in the early stages of the compiler. super() would need a
> class object to be reliable; the class *name* (which is all that's
> available at compile time) might resolve to something else at runtime.

That's all the current super() gets, right? super(Base, self).meth()
compiles with a LOAD_GLOBAL (Base)... Any mechanisms I can think of to
solidify that into the actual class reference either rely on
__mangled_attrs being assigned at or after class construction, or
potentially break in inherited classes.

Michael
--
Michael Urman  http://www.tortall.net/mu/blog


More information about the Python-3000 mailing list