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

Jim Fulton jim at zope.com
Tue Mar 14 06:44:34 EST 2006


Philipp von Weitershausen wrote:
> 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

Likewise.

Jim

-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org


More information about the Zope3-dev mailing list