On Mar 7, 11:20 am, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > [Cruxic] > > > Is it possible to get an object out of a set() given another object > > that has the same hash code and equality (__hash__() and __eq__() > > return the same)? > > Yes, but it requires an indirect > approach.http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/499299 > > Raymond
That's a clever work around. Thanks, Raymond. Clearly you had a need for this. Do you feel it's a common need that should be submitted as a Python feature request? To me it seems like such a simple thing that would increase the general utility of the set class. I suppose I could start another thread like "feature request: New method for set - get_equivalent". -- http://mail.python.org/mailman/listinfo/python-list