[Python-3000] pyvm module - low level interface to Python's VM
Phillip J. Eby
pje at telecommunity.com
Mon Dec 3 16:36:45 CET 2007
At 03:48 PM 12/3/2007 +0100, Christian Heimes wrote:
>Nick Coghlan wrote:
> > Aren't the metaclass changes in PEP 3115 partially aimed at eliminating
> > the need for stack frame hackery to implement these kinds of things?
> > (e.g. the metaclass could stuff a closure into the class namespace under
> > the name 'implements' to avoid any need for frame hackery).
>
>Couldn't we use a similar approach like the new super() magic? As far as
>I remember super() can access its class through a new cell '__class__'.
>Maybe we could introduce a similar way to access the namespace of a
>class during its construction time?
You can already access it with locals(). It's just that without
_getframe, you have to do something like 'implements(locals(), IExample)'.
More information about the Python-3000
mailing list