Added __eq__ and __hash__ to the Irc class (necessary for the Relay module)

This commit is contained in:
Jeremy Fincher 2003-03-26 06:56:02 +00:00
parent a848a8982d
commit 1623c594d7
1 changed files with 7 additions and 0 deletions

View File

@ -387,4 +387,11 @@ class Irc(object):
for callback in self.callbacks:
callback.die()
world.ircs.remove(self)
def __hash__(self):
return id(self)
def __eq__(self, other):
return id(self) == id(other)
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78: