[Zope3-dev] delete IHomogenousContainer interface? (affects AuthenticationService, TranslationService)

Jim Fulton jim@ZOPE.COM
Wed, 18 Dec 2002 10:47:18 -0500


Gary Poster wrote:
> I added the following interface to IContainer.py in the spring.  It was 
> before the whole addable menu stuff we have now.  Jim added the (rather 
> polite :-) comment, I think.
> 
> class IHomogenousContainer(Interface):
> 
>     # XXX this needs to be rethought a bit.
>     def isAddable(interfaces):
>         """Test for interface compatability for container and factory
> 
>         Tells you whether something that implements the given
>         interfaces may be added to this container.
> 
>         The argument may be a single interface, a tuple of interfaces,
>         or None, if the thing you're considering adding declares no
>         interfaces.
> 
>         Returns a true value if an object that implements absolutely all
>         of the given interfaces may be added to this container.
>         Otherwise, returns false."""
> 
> This interface is now being used in the AuthenticationService and the 
> TranslationService code.  isAddable is actually only called in test code 
> for the AuthenticationService and nowhere else: it is not being used by 
> any of the addable menu calls, nor, in fact, do the two services call 
> isAddable themselves in their setObject code.
> 
> Should we (I'm offering) remove the interface and the implementations? I 
> think it is a useful idea, but the addable menu thing goes a different 
> direction, nothing uses it, and the Pope has raised a metaphorical 
> eyebrow. :-)

That would be great. Please go ahead.

Jim



-- 
Jim Fulton           mailto:jim@zope.com       Python Powered!
CTO                  (888) 344-4332            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org