[Zope3-dev] tagged value handling inconsequent for interface methods and attributes and interfaces themself

Stephan Richter srichter at cosmos.phy.tufts.edu
Sat Nov 12 06:47:43 EST 2005


On Tuesday 01 November 2005 04:27, Grégoire Weber wrote:
> 2005/10/24, Stephan Richter <stephan.richter at tufts.edu>:
> > class IFoo(zope.interface.Interface):
> >
> >   attr = zope.interface.Attribute('doc string')
> >   ITaggedValues(attr).someVariable = value
> >
> > Any comments before I spend time writing this up?
>
> The drawback*) of this is that the adapter registry has to be in place.
>
> *) Mostly a drawback if you only use ``zope.interface``

No it does not need to necessarily, because the __conform__ method is called
before a standard adapter lookup is made. Also, for those type of scenarios
we could have a custom adapter registry. Luckily adapter registries are
implemented in zope.interface.adapter, so no external packages would be
necessary.

Regards,
Stephan
--
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training

-------------------------------------------------------

-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training


More information about the Zope3-dev mailing list