[Zope3-dev] Re: calling interface returns object, calling queryAdapter returns None?

Chris Withers chris at simplistix.co.uk
Wed Jan 24 17:37:14 EST 2007


Laurence Rowe wrote:
>  From the Interface.__call__ docstring: "If an object already implements 
> the interface, then it will be returned"
> 
> queryAdapter is looking in the adapter registry.
> 
> You have not registered any adapters.
> 
> So this looks like the expected behaviour to me.

Documented maybe, expected no.

queryAdapter, for me, is "starting with the supplied object, get me 
something that implements the supplied interface and return None if no 
such object can be obtained".

If there's another function which does this, fine, if not, then I 
maintain the current behaviour is not correct...

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk


More information about the Zope3-dev mailing list