JKPeck wrote: > I would like to be able use sets where the set members are objects of a > class I wrote. > I want the members to be distinguished by some of the object content, > but I have not figured out how a set determines whether two (potential) > elements are identical. I tried implementing __eq__ and __ne__ and > __hash__ to make objects with identical content behave as identical for > set membership, but so far no luck.
__eq__ and __hash__ are necessary and sufficient. Code? -Mike -- http://mail.python.org/mailman/listinfo/python-list