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

Jim Fulton jim at zope.com
Tue Feb 8 16:19:27 EST 2005


Garrett Smith wrote:
> 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)

Ugh. Yes. Sorry

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

:)

Cool

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