[Zope3-dev] Use of 'adapts' in Zope core
Jim Fulton
jim at zope.com
Tue Feb 8 15:55:00 EST 2005
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.
I'll note that I don't feel a need to mandate this, especially
since this is still a fairly new feature that we don't have
much experience with.
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