[Zope3-dev] Re: calling interface returns object,
calling queryAdapter returns None?
Jim Fulton
jim at zope.com
Wed Jan 24 17:42:15 EST 2007
On Jan 24, 2007, at 5:37 PM, Chris Withers wrote:
> 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, documented behavior is not incorrect just because you expect
otherwise.
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