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