[Zope3-dev] Ranking adapters (2nd try)

Jim Fulton jim at zope.com
Tue Sep 30 13:50:13 EDT 2003


Phillip J. Eby wrote:
> At 07:52 PM 9/30/03 +0300, Steve Alexander wrote:
> 
>> Here's my rationale:
>>
>> * A112 disappears because it is a registration for exactly the same 
>> from->to as A212.
>>
>> * I put A111 before A110 because B1 is more specific than B0. A B1 can 
>> do all of what a B0 can do. Liskov substitutably etc.
> 
> 
> Note that historically, Zope interface adapter registries have 
> considered an adapter for a more general interface to take precedence 
> over an adapter for a more specific interface.

I don't think you meant to use the word "for" above, or at least not
to use "for" the way I use "for".

Zope always looks adapters for (from, requiring) more specific
interfaces higher priority.  Zope gives adapters to (providing) more general
interfaces higher priority when an adapter to the more general interface
is sought.

Jim

-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org




More information about the Zope3-dev mailing list