def __hash__(self): if self._hash_value is not None: return self._hash_value from loopy.tools import LoopyKeyBuilder from pytools.persistent_dict import new_hash key_hash = new_hash() self.update_persistent_hash(key_hash, LoopyKeyBuilder()) self._hash_value = hash(key_hash.digest()) return self._hash_value
def __hash__(self): from loopy.tools import LoopyKeyBuilder from pytools.persistent_dict import new_hash key_hash = new_hash() self.update_persistent_hash(key_hash, LoopyKeyBuilder()) return hash(key_hash.digest())