def __eq__(self, other):
        """ Compare the JID to another instance or to string for equality. """
        try: other=JID(other)
        except __HOLE__: return 0
        return self.resource==other.resource and self.__str__(0) == other.__str__(0)
dataset/ETHPy150Open CouchPotato/CouchPotatoServer/libs/xmpp/protocol.py/JID.__eq__