[Zope3-dev] Interface declaration API
Gary Poster
gary@modernsongs.com
Tue, 11 Mar 2003 17:11:49 -0500
Jim Fulton wrote:
> Gary Poster wrote:
>> FWIW, I'd greatly prefer what you prefer, Jim. At one point, and
>> maybe now, the event and object hub services code used this
>> distinction, I believe.
>
> Meaning that they subclassed a class without satisfying the base class'
> interface?
Yep. I believe it had to do with the subscription behavior.
>> > ...snip...
>> > I'll call YAGNI on doesNotImplement.
>>
>> However, if the "inherit everything" behavior does become the default,
>> this would no longer be a YAGNI, I think.
>
>
> It would be a yagni, because implements would have this meaning. In::
>
> class A:
> implements(IA)
>
> class B(A): pass
>
> class C(A):
> implements(IC)
>
> Instances of A and B have the IA interface, but instances of C have only
> the
> IC interface.
Ah, gotcha. The event and hub services would have been (and may still
be) a more complex version of class C.
Gary