'Calculate hash.
L{JID}s with identical constituent user, host and resource parts have
equal hash values.  In combination with the comparison defined on JIDs,
this allows for using L{JID}s in sets and as dictionary keys.'

def __hash__(self):

    return hash((self.user, self.host, self.resource))
