On Thu, Jan 18, 2007 at 08:55:17AM +0000, Chris Withers wrote:
> Marius Gedminas wrote:
> >BTW passing interfaces to provideAdapter/<adapts> is out of fashion. 
> This stuff is getting almost perl-ish in it's "there's many ways to do 
> it, pick the style you like" nature..

There's a slight difference, I think.  In the Zope 3 world, there's
usually one style that is considered to be the best way of doing stuff.
Only it varies with time and with individual Zope 3 developers. ;-)

> >I
> >prefer using zope.component.adapts and zope.interface.implements (or
> >zope.component.adapter and zope.interface.implementer, when my adapter
> >is a function rather than a class).
> I often register the same adapter factory for several different types or 
> objects / interfaces. How would I do that with your favoured spelling?

If you pass the adapts/provides arguments to provideAdapter (or the ZCML
directive), the values you specify override the defaults declared by the
adapter itself.

Marius Gedminas
Some people have told me they don't think a fat penguin really embodies the
grace of Linux, which just tells me they have never seen a angry penguin
charging at them in excess of 100mph. They'd be a lot more careful about what
they say if they had.
                -- Linus Torvalds, announcing Linux v2.0

Attachment: signature.asc
Description: Digital signature

Zope3-dev mailing list
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to