Phillip J. Eby wrote:
> Well, for what class-level frame hacking is typically used for, it
> would suffice to have a convenient way to refer to the local
> namespace, e.g. if you could do something like:
>
> implements(@, IExample)
>
> where @ was a shortcut for locals(). The most-used frame hacks (in
> zope.interface and most PEAK tools) just want to access the namespace
> of the current class definition, and maybe decorate the class in some way.
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).
Cheers,
Nick.
--
Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia
---------------------------------------------------------------
http://www.boredomandlaziness.org
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com