[Zope3-dev] Re: reasonable syntax for multi-adaptation

Marius Gedminas mgedmin at b4net.lt
Wed Sep 26 22:13:27 EDT 2007


On Wed, Sep 26, 2007 at 09:09:37PM -0400, Tres Seaver wrote:
> Why does the caller care?  She just wants an object which will provide
> the 'IFoo' contract on behalf of the passed context.  If 'x' is capable
> of providing 'IFoo' without help, then failing (or worse, returning a
> less-specific factory result) when calling 'getAdapter' is the Wrong
> Thing (a "least surprise" violation, if nothing else).

FWIW it was a big surprise to me when I discovered that IFoo(x) has
different semantics from getAdapter(x, IFoo).

Marius Gedminas
-- 
C is for Cookies.  Perl is even better for Cookies.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.zope.org/pipermail/zope3-dev/attachments/20070926/9c0a926d/attachment.bin


More information about the Zope3-dev mailing list