Re: Re: reasonable syntax for multi-adaptation
Jim Fulton <[email protected]> Fri, 28 Sep 2007 11:21:41 -0400
| Newsgroups | gmane.comp.web.zope.zope3 |
|---|---|
| Message-ID | <[email protected]> |
On Sep 28, 2007, at 11:14 AM, Martijn Faassen wrote: ... > On 9/28/07, Jim Fulton <[email protected]> wrote: > [snip] >>> we could investigate whether we can't come up with something that: >>> >>> * doesn't break the existing notation. The cleanest way to support >>> such non-interference seems to be to do this using an extra .adapt >>> method. This is unfortunate, as I at least consider it prettier if >>> it used the IFoo() syntax (even though I proposed .adapt). >> >> I agree. > > Hm, you agree with my evaluation, but would this mean you'd suggest we > use 'adapt' or extend the __call__ syntax? In the short-to-medium term the adapt method is my preference. ... >> After thinking about it, I think I can avoid the extra hook. Don't >> worry about the details. :) > > Cool! The person that tries to implement this will have to worry about > them, though, so we'll get back to you on that, I'm sure. Yup. ... > Do you suggest we extend zope.component with support for this, or > would you suggest we indeed create a new package? You'll need to modify InterfaceClass to add the new adapt method and __call__ semantics. The hook installed by zope.component will need to be updated as well. I see no new package being warrented. Jim -- Jim Fulton Zope Corporation