aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mop/__init__.py2
-rw-r--r--t/overrides_test.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/mop/__init__.py b/mop/__init__.py
index b75fd67..5df6ab8 100644
--- a/mop/__init__.py
+++ b/mop/__init__.py
@@ -21,7 +21,7 @@ def execute_method(body, invocant, args, kwargs):
# our mop infrastructure
UNDERLYING_CLASSES = {}
def python_class_for(c, name=None):
- key = c.__hash__()
+ key = hash(c)
if key not in UNDERLYING_CLASSES.keys():
if name is None:
name = c.name()
diff --git a/t/overrides_test.py b/t/overrides_test.py
index adf60b3..683d071 100644
--- a/t/overrides_test.py
+++ b/t/overrides_test.py
@@ -107,14 +107,14 @@ class OverridesTest(unittest.TestCase):
body=lambda self: self.metaclass.all_attributes()["db"].value(self)
))
def value(self, instance):
- key = str(instance.__hash__()) + ":" + self.name()
+ key = str(hash(instance)) + ":" + self.name()
return self.db().lookup(key)
DatabaseAttribute.add_method(DatabaseAttribute.method_class().new(
name="value",
body=value,
))
def set_value(self, instance, new_value):
- key = str(instance.__hash__()) + ":" + self.name()
+ key = str(hash(instance)) + ":" + self.name()
self.db().insert(key, new_value)
DatabaseAttribute.add_method(DatabaseAttribute.method_class().new(
name="set_value",