[Zope3-Users] Re: Checking if an interface is provided by an
object or could be adapted to
Bernd Dorn
zope-mailinglist at mopa.at
Sun Apr 30 19:34:28 EDT 2006
On 01.05.2006, at 00:39, Martin Aspeli wrote:
> On Sun, 30 Apr 2006 23:31:37 +0100, Bernd Dorn <zope-
> mailinglist at mopa.at> wrote:
>
>> i would use
>>
>> return IFoo(context, False) is not False or False
>
> Aha, didn't know you could do that. Thanks :)
>
> How do I do that for multi-adapters, though?
you can't do this with the interface directly
from zope import component
component.queryMultiAdapter((bar,baz), IFoo) is not None or False
>
> Martin
>
> --
> "You can just adapt yourself out of it..." // Archipelago sprint
> 26/04/2006
>
> _______________________________________________
> Zope3-users mailing list
> Zope3-users at zope.org
> http://mail.zope.org/mailman/listinfo/zope3-users
More information about the Zope3-users
mailing list