From 1623c594d7e26bb7c28b11af4c5065ba07224084 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Wed, 26 Mar 2003 06:56:02 +0000 Subject: [PATCH] Added __eq__ and __hash__ to the Irc class (necessary for the Relay module) --- src/irclib.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/irclib.py b/src/irclib.py index 81f4e35c6..a8a79e397 100644 --- a/src/irclib.py +++ b/src/irclib.py @@ -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: