Jim Fulton wrote at 2007-1-25 09:11 -0500:
> ...
>I disagree with this assertion for the reason that Marius stated,
>which is that adapters are factories and utilities are not. I
Should I be really interested in this implementation detail?
All I care of, is that the returned object implement
On Jan 24, 2007, at 8:44 PM, Tres Seaver wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Chris Withers wrote:
Fred Drake wrote:
On 1/24/07, Chris Withers <[EMAIL PROTECTED]> wrote:
queryAdapter, for me, is "starting with the supplied object, get me
something that implements the supplie
All the following are great, especially the (SF) ones ;-)
Tres Seaver wrote:
>>> from zope.interface import Interface, Attribute
>>> from zope.interface import implements, directlyProvides
>>> from zope.component import provideUtility, provideAdapter, adapts
>>> class IFoo(Interface):
On Wed, Jan 24, 2007 at 08:44:31PM -0500, Tres Seaver wrote:
> Note that for regularity, I assert that the calling the IFoo interface
> should allow the follwing use cases, based on the asserition that
> utilities are "zero-order" adapters, just as views are "binary order"
> adapters.
There is a v
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Chris Withers wrote:
> Fred Drake wrote:
>> On 1/24/07, Chris Withers <[EMAIL PROTECTED]> wrote:
>>> queryAdapter, for me, is "starting with the supplied object, get me
>>> something that implements the supplied interface and return None if no
>>> such
Fred Drake wrote:
On 1/24/07, Chris Withers <[EMAIL PROTECTED]> wrote:
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".
o = IFoo(ob, None)
if os is not None:
Ah, now that
Jim Fulton wrote:
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.
Indeed, sorry, that's not what I meant, although I can see it came
across like
On 1/24/07, Chris Withers <[EMAIL PROTECTED]> wrote:
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".
o = IFoo(ob, None)
if os is not None:
...
If there's another funct
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 t
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, ex
Chris Withers wrote:
Hot on the heels of my multi-adapter problem:
http://mail.zope.org/pipermail/zope3-dev/2007-January/021600.html
...which I'm still waiting for guidance on, I now find that queryAdapter
and calling an interface behave unexpectedly differently in the case
where an object di
11 matches
Mail list logo