[Zope3-dev] Re: wildcard adapter

Philipp von Weitershausen philipp at weitershausen.de
Wed Jan 17 16:53:38 EST 2007


Martin Aspeli wrote:
> 
> 
> Chris Withers wrote:
>> Hi All,
>>
>> I was wondering if someone could give me a definitive explanation of 
>> what the following means:
>>
>> <adapter
>>      for="* ISomething *"
>>      ...
>>
>> ...means?
>>
>> Is the following equivalent:
>>
>> provideAdapter(...,adapts=(None,ISomething,None),...)
>>
> 
> No, but this is:
> 
> provideAdapter(...,adapts=(Interface, ISomething, Interface),...)

Actually, ZCML translates a "*" to None. And as of Zope 3.3, adapting 
None or Interface is equivalent.


-- 
http://worldcookery.com -- Professional Zope documentation and training
2nd edition of Web Component Development with Zope 3 is now shipping!



More information about the Zope3-dev mailing list