Re: Re: reasonable syntax for multi-adaptation
Marius Gedminas <[email protected]> Wed, 26 Sep 2007 22:13:27 -0400
| Newsgroups | gmane.comp.web.zope.zope3 |
|---|---|
| Message-ID | <20070927021327.GA11880@platonas> |
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.
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFG+xHHkVdEXeem148RAh/yAJ9Iphl5Pjh/mDEeI+4z7ysNSI7ZQwCff4cz DKxxzCM2H7VYhDj5nVVEdjw= =ttI5 -----END PGP SIGNATURE-----