On Wed, 23 Jan 2008 10:32:55 -0200, Eduardo O. Padoan wrote: > 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 > > ?
Oops. Yes, thank you. -- Steven -- http://mail.python.org/mailman/listinfo/python-list