each _BaseObject descendant has a unique __hash__ now
This commit is contained in:
parent
fa6093313a
commit
16c9e14a4d
|
@ -1025,6 +1025,9 @@ class _BaseObject(object):
|
|||
"""Returns the most common set of parameters between all objects."""
|
||||
|
||||
return {}
|
||||
|
||||
def __hash__(self):
|
||||
return hash(self.network) + hash("".join(self._get_params().keys() + self._get_params().values()))
|
||||
|
||||
class _Taggable(object):
|
||||
"""Common functions for classes with tags."""
|
||||
|
|
Loading…
Reference in a new issue