def __hash__(self): """Return a hash based on the value that is calculated on demand and cached.""" if not self._hash: self._hash = _misc.get_hash( 'algebraixlib.mathobjects.couplet.Couplet', self.left, self.right) return self._hash
def __hash__(self): """Return a hash based on the value that is calculated on demand and cached.""" if not self._hash: counter_parts = self.data.items() multiset_parts = ['algebraixlib.mathobjects.multiset.Multiset'] # noinspection PyTypeChecker multiset_parts.extend(counter_parts) self._hash = _misc.get_hash(*multiset_parts) return self._hash
def __hash__(self): """Return a hash based on the member values. (It must match the implementation of `is_same`, to which `Structure.__eq__` redirects equality comparisons.) Is always cached. """ return _misc.get_hash(_misc.get_full_class_name(self), self.base_set)
def __hash__(self): """Return a hash based on the value that is calculated on demand and cached.""" if not self._hash: self._hash = _misc.get_hash('algebraixlib.mathobjects.set.Set', self.data) return self._hash