[Zope-dev] zope.component: calling an Interface and calling queryAdapter give differing results

Shane Hathaway shane at hathawaymix.org
Tue Aug 19 16:24:29 EDT 2008


Philipp von Weitershausen wrote:
> Shane Hathaway wrote:
>> Looks like a bug to me.  If the object passed as the first argument to 
>> queryAdapter() implements the interface passed as the second argument, I 
>> believe queryAdapter() should return the object, regardless of any 
>> component registrations.
> 
> No, it's not a bug. This is in fact a feature (like it or not).

While I respect that this feature may have been chosen carefully, it 
nevertheless seems more like a misfeature.  Chris' expectation was 
reasonable and ought not to be violated without a good cause.  What code 
depends on it?

Shane



More information about the Zope-Dev mailing list