Commit cf653bd3 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

doc tweaks

parent 50c56bdd
Pipeline #24645 passed with stage
in 22 minutes and 32 seconds
......@@ -35,13 +35,20 @@ class Domain(with_metaclass(
raise NotImplementedError
def __hash__(self):
"""Returns a hash value for the object.
Only members that are explicitly added to
:py:attr:`._needed_for_hash` will be used for hashing.
result_hash = 0
for key in self._needed_for_hash:
result_hash ^= hash(vars(self)[key])
return result_hash
def __eq__(self, x):
"""Checks if two domains are equal.
"""Checks whether two domains are equal.
......@@ -62,6 +69,7 @@ class Domain(with_metaclass(
return True
def __ne__(self, x):
"""Returns the opposite of :py:meth:`.__eq__()`"""
return not self.__eq__(x)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment