summaryrefslogtreecommitdiff
path: root/qpid/python
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2008-11-24 14:36:52 +0000
committerTed Ross <tross@apache.org>2008-11-24 14:36:52 +0000
commiteec5bffa802b66904bba3b8c7af868ef318c0fdb (patch)
treec59bfb70939a1068bc895eb4bf1b9fef867d75ed /qpid/python
parentac6e526370a8e860123a97fced2019ebb28146ce (diff)
downloadqpid-python-eec5bffa802b66904bba3b8c7af868ef318c0fdb.tar.gz
Added __hash__ and __eq__ methods to ObjectId.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@720204 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python')
-rw-r--r--qpid/python/qmf/console.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/qpid/python/qmf/console.py b/qpid/python/qmf/console.py
index cdc3ae3406..17d179b4d6 100644
--- a/qpid/python/qmf/console.py
+++ b/qpid/python/qmf/console.py
@@ -940,6 +940,12 @@ class ObjectId:
codec.write_uint64(self.first)
codec.write_uint64(self.second)
+ def __hash__(self):
+ return (self.first, self.second).__hash__()
+
+ def __eq__(self, other):
+ return (self.first, self.second).__eq__(other)
+
class Object(object):
""" """
def __init__(self, session, broker, schema, codec, prop, stat):