[zope2-tracker] [Bug 143403] Re: accidental acquisition

Tres Seaver tseaver at palladion.com
Mon May 17 13:29:57 EDT 2010


The patch looks reasonable.  It needs a test.

BTW, defining 'objectValues' (and 'objectIds' / 'objectItems') as
returning empty sequences for a leaf object is not a "dirty hack":  it
is a classic application of the "composite pattern"[1].  Having leaves
share the abstract container interface makes writing recursive code
vastly simpler.  I strongly doubt that this is the only place in the
Zope2 codebase which interacts badly with sub-objects which do not define
those methods.


[1] http://en.wikipedia.org/wiki/Composite_pattern

** Changed in: zope2
       Status: New => Triaged

-- 
accidental acquisition
https://bugs.launchpad.net/bugs/143403
You received this bug notification because you are a member of Zope 2
Developers, which is subscribed to Zope 2.


More information about the zope2-tracker mailing list