Removing objects
Eduardo O. Padoan
eduardo.padoan at gmail.com
Wed Jan 23 07:32:55 EST 2008
On Jan 23, 2008 9:55 AM, Steven D'Aprano
<steve at remove-this-cybersource.com.au> 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
More information about the Python-list
mailing list