Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tutorius/properties.py
diff options
context:
space:
mode:
authormike <michael.jmontcalm@gmail.com>2009-12-04 05:58:29 (GMT)
committer mike <michael.jmontcalm@gmail.com>2009-12-04 05:58:29 (GMT)
commit9a44da4488a0ff00150eb5cb114f74ba560b96a6 (patch)
treee3e122fc895e0a6b40dee417fe816022af8fb4ca /tutorius/properties.py
parent49ab39870266196f6267f83dd6951f839ebde773 (diff)
Creator, Remote : Dual code review power!
Diffstat (limited to 'tutorius/properties.py')
-rw-r--r--tutorius/properties.py20
1 files changed, 1 insertions, 19 deletions
diff --git a/tutorius/properties.py b/tutorius/properties.py
index 85e8aa5..f273569 100644
--- a/tutorius/properties.py
+++ b/tutorius/properties.py
@@ -140,26 +140,8 @@ class TPropContainer(object):
"""
return deepcopy(self._props)
- # Providing the hash methods necessary to use TPropContainers
- # in a dictionary, according to their properties
- def __hash__(self):
- # many places we use containers as keys to store additional data.
- # Since containers are mutable, there is a need for a hash function
- # where the result is constant, so we can still lookup old instances.
- return self.__id
-
def __eq__(self, e2):
- return self.__id == e2.__id or \
- (isinstance(e2, type(self)) and self._props == e2._props)
-
- # Adding methods for pickling and unpickling an object with
- # properties
- def __getstate__(self):
- return dict(id=self.__id, props=self._props.copy())
-
- def __setstate__(self, dict):
- self.__id = dict['id']
- self._props.update(dict['props'])
+ return (isinstance(e2, type(self)) and self._props == e2._props)
class TutoriusProperty(object):
"""