Allow JID objects to be compared with strings.

Two JIDs match if they have the same full JID value.
This commit is contained in:
Lance Stout 2011-01-05 20:16:15 -05:00
parent 8b29431cde
commit 2908751020

View file

@ -124,3 +124,9 @@ class JID(object):
def __repr__(self):
return str(self)
def __eq__(self, other):
"""
Two JIDs are considered equal if they have the same full JID value.
"""
return str(other) == str(self)