[Zope3-dev] Re: Basic Interfaces question
Philipp von Weitershausen
philipp at weitershausen.de
Mon Jun 7 10:43:11 EDT 2004
Jim,
> Let's say we have an interface IFoo and an interface IFooExtended
>
> IFoo defines foo as
>
> def foo():
> """do foo"""
>
> IFooExtended defines foo as
>
> def foo(myParam=None)
> """do the same thing as foo in IFoo, except use myParam to extend
> behavior if available"""
>
> should IFooExtended descend from IFoo, or should IFooExtended be a
> different interface?
>
> i.e., should the definition of IFooExtended be
>
> class IFooExtended(IFoo):
Usually you would subclass the IFoo interface, but it really depends on
the meaning you attach to IFooExtended. Are things that are IFooExtended
also IFoo? Judging by the name IFooExtended, I would think so, but it
depends on the meaning you want to give it.
Philipp
More information about the Zope3-dev
mailing list