[Zope3-dev] Re: a new zcml directive?

Philipp von Weitershausen philipp at weitershausen.de
Mon Mar 13 19:46:04 EST 2006


Marius Gedminas wrote:
> I'd prefer
> 
>     from zope.annotation.adapter import AnnotationAdapter
> 
>     getFoo = AnnotationAdapter(for_=IBar,
>                                interface=IFoo,
>                                factory=Foo,
>                                key=FOO_KEY)
>     # I suppose the key could be optional; you could use a dotted
>     # interface name by default
> 
> and then the ordinary
> 
>     <zope:adapter factory=".foo.getFoo" />

+10

Philipp


More information about the Zope3-dev mailing list