On Jan 23, 2008 9:55 AM, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > For that to work, you need to give your class an __eq__ method, and have > it match by name: > > # put this in MyClass > def __eq__(self, other): > return self.name == self.other
Do you mean: # put this in MyClass def __eq__(self, other): return self.name == other.name ? -- http://www.advogato.org/person/eopadoan/ Bookmarks: http://del.icio.us/edcrypt -- http://mail.python.org/mailman/listinfo/python-list