From e0b55720b049c12b3d988614a202fa52b370bea9 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 1 Nov 2014 13:38:22 -0400 Subject: call hash(), not __hash__() --- t/overrides_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 't/overrides_test.py') 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", -- cgit v1.2.3-54-g00ecf