[Zope3-dev] Use of 'adapts' in Zope core

Garrett Smith garrett at mojave-corp.com
Tue Feb 8 16:18:24 EST 2005


Jim Fulton wrote:
> Garrett Smith wrote:
>> Jim Fulton wrote:
>> 
>>> Garrett Smith wrote:
>>> 
>>>> When we create adapters in the Zope core, should we start to use
>>>> `adapts` when we can?
>>> 
>>> Yes
>> 
>> 
>> Okay, now for a silly question...since we'll be seeing a lot of these
>> declarations next to `implements`, what's the preferred notation:
>> 
>>   implement(IFoo)
>>   adapts(IBar)
>> 
>> (no space beteen lines) or:
>> 
>>   implements(IFoo)
>> 
>>   adapts(IBar)
>> 
>> (one space between the lines), or:
>> 
>>   implements(IFoo); adapts(IBar)
>> 
>> or other?
> 
> I prefer:
> 
>     implement(IFoo)
>     adapts(IBar)
> 
> I prefer that order because I find it natural to think of this as
> inputs then outputs.

Do you mean:

  adapts(IBar)
  implements(IFoo)

I prefer this (also?), based on the input/output thinking.

 -- Garrett


More information about the Zope3-dev mailing list