[Zope3-dev] interface implementation errors

Jim Fulton jim@zope.com
Mon, 11 Nov 2002 17:50:21 -0500


Guido Wesdorp wrote:
> On Friday 08 November 2002 13:24, Steve Alexander wrote:
> 
>>In the interface IPersistent.py, _p_independent is described as being an
>>optional method that a persistent object type can define to return true
>>if it wants to declare it isn't bothered about read conflicts.
>>
>>
> Maybe due to my lack of fully understanding OO and interfaces, but to me it 
> sounds like _p_independent shouldn't be defined on the interface, I think 
> interfaces should describe the members that should be implemented to ensure 
> proper functioning of the object in the context the interface is built for, 
> and no more.

That's why _p_independent probably shouldn't be in this interface.
It probably should be in a different interface that objects may or
may not elect to implement.

 > For this reason I think we (the Zope3 sprint doc team) should
> use objects rather than interfaces to document Zope, since the objects can 
> define more members than defined on the interfaces.

I don't agree. There's no way to know if these additional members are
part of the objects external behavior or now. Besides, we are generally documenting
objects by documenting interfaces. This allows us to avoid a lot of duplication,
since many objects implement the same interfaces.

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