Browse Source

[#45] Changed the __hash__ implementation of the EmComponent class

Roland Haroutiounian 9 years ago
parent
commit
c916801c99
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      EditorialModel/components.py

+ 2
- 1
EditorialModel/components.py View File

@@ -79,7 +79,8 @@ class EmComponent(object):
79 79
     ## @brief Hash function that allows to compare two EmComponent
80 80
     # @return EmComponent+ClassName+uid
81 81
     def __hash__(self):
82
-        return "EmComponent"+self.__class__.__name__+str(self.uid)
82
+        return hash(str(self.attr_dump))
83
+        # return "EmComponent"+self.__class__.__name__+str(self.uid)
83 84
 
84 85
     ## @brief Test if two EmComponent are "equals"
85 86
     # @return True or False

Loading…
Cancel
Save