[Zope-dev] improving the utility and adapter lookup APIs

Chris McDonough chrism at plope.com
Sat Nov 28 11:37:01 EST 2009


Martijn Faassen wrote:
>>> I'd be in favor of an API based off calling the interface directly for 
>>> everything *if* we can come up with a backwards compatibility story somehow.
>> Just as a data point, I forgot to hook "adapter_hook" in BFG (and I still 
>> haven't), which means that the IFoo() sugar doesn't work.  Nobody noticed, even 
>> though lots of folks who use BFG also use the ZCA global API.
>>
>> I'm not implying that this means it's not useful or convenient for old hands. 
>> But the old hands don't really need it.
> 
> Interesting. If you mostly do multi-adaptation (and utility lookups) you 
> won't notice it as we know multi adaptation cannot be done with the 
> adapter hook. Was this the case?

It's hard to know.  No application written using BFG can use the IFoo() pattern 
at all, and no one complained.  The only generalization I can take away from 
that is that anyone who has written a BFG app and also used the ZCA APIs did 
not care about the IFoo() pattern.  That's maybe not a really useful 
generalization, because many BFG apps don't use the ZCA APIs at all.

- C



More information about the Zope-Dev mailing list