each _BaseObject descendant has a unique __hash__ now

This commit is contained in:
Amr Hassan 2009-10-06 14:27:24 +00:00
parent fa6093313a
commit 16c9e14a4d
2 changed files with 4 additions and 1 deletions

2
.build
View file

@ -1 +1 @@
13
14

View file

@ -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."""