Re: Intersection of lists/sets -- with a catch

2005-10-18 Thread George Sakkis
"Carl Banks" <[EMAIL PROTECTED]> wrote: > Howabout something like this (untested): > > class CmpProxy(object): > def __init__(self,obj): > self.obj = obj > def __eq__(self,other): > return (self.obj.att_a == other.obj.att_b > and self.obj.att_b == other.obj.

Re: Intersection of lists/sets -- with a catch

2005-10-18 Thread Carl Banks
James Stroud wrote: > Hello All, > > I find myself in this situation from time to time: I want to compare two lists > of arbitrary objects and (1) find those unique to the first list, (2) find > those unique to the second list, (3) find those that overlap. But here is the > catch: comparison is no