[ZODB-Dev] Fwd: [Zope3-dev] directory hierarchy proposal (Martijn Faassen)

Steve Alexander steve@cat-box.net
Wed, 11 Dec 2002 15:37:41 +0000


Jeremy Hylton wrote:
> "SA" == Steve Alexander <steve@cat-box.net> writes:
> 
> 
>   SA> Can they be methods on objects, rather than functions in a
>   SA> module?
> 
> Just what I asked Tim :-).  There are as many as six functions --
> difference, union, intersection, weightedUnion, weightedIntersection,
> and multiunion.  The functions operate on sets; they accept any of XY
> family of objects.  So it's not obvious what they would be methods
> of.  Each object -- Set, TreeSet, Bucket, BTree -- could get a copy of
> the code, but that seems a little silly.

Why is that silly? Code isn't a huge overhead. The code is templated 
anyway. If I did this in Python, I'd put that code in a mix-in class.

--
Steve Alexander