online-desktop r7243 - trunk/pyddm/ddm



Author: otaylor
Date: Tue Feb 19 22:03:42 2008
New Revision: 7243
URL: http://svn.gnome.org/viewvc/online-desktop?rev=7243&view=rev

Log:
Remove the custom hash/equals on Resource ... it caused all sorts of 
  hard to debug problems because resources from old and new generations
  compared ==.


Modified:
   trunk/pyddm/ddm/Resource.py

Modified: trunk/pyddm/ddm/Resource.py
==============================================================================
--- trunk/pyddm/ddm/Resource.py	(original)
+++ trunk/pyddm/ddm/Resource.py	Tue Feb 19 22:03:42 2008
@@ -147,24 +147,6 @@
     def __repr__(self):
         return 'Resource(' + self.resource_id + ')'
 
-    def __cmp__(self, other):
-        if not isinstance(other, Resource):
-            return -1
-        return self.resource_id.__cmp__(other.resource_id)
-
-    def __eq__(self, other):
-        if not isinstance(other, Resource):
-            return False
-        return self.resource_id == other.resource_id
-
-    def __ne__(self, other):
-        if not isinstance(other, Resource):
-            return True
-        return self.resource_id != other.resource_id
-
-    def __hash__(self):
-        return self.resource_id.__hash__()
-
     def _get_by_id(self, property_id):
         try:
             return self.__properties[property_id]



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]