[Zope-dev] implementing zope.component 4.0

Lennart Regebro regebro at gmail.com
Sat Nov 28 02:45:10 EST 2009


On Fri, Nov 27, 2009 at 13:11, Marius Gedminas <marius at gedmin.as> wrote:
> Personally, I prefer Zope's syntax ("decorators" inside the class block)
> to Python's (decorators above the class block), aesthetically.

Yes, but it doesn't work under Python 3. We don't need to remove the
support for Python 2, though, we can have both.

> I think so, with some caveats.  E.g. something like
>
>    class Interface(...):
>
>        def __call__(...):
>            new_semantics = (sys._getframe(1).f_globals.get('__new_lookup__')
>                             is zope.component.__future__.__new_lookup__)

Looks reasonable to me. Could work.

-- 
Lennart Regebro: Python, Zope, Plone, Grok
http://regebro.wordpress.com/
+33 661 58 14 64


More information about the Zope-Dev mailing list