Author: Armin Rigo <[email protected]>
Branch: rpython-hash
Changeset: r89811:4a6390ab0e05
Date: 2017-01-27 23:38 +0100
http://bitbucket.org/pypy/pypy/changeset/4a6390ab0e05/

Log:    Another place that caches the hash

diff --git a/pypy/objspace/std/setobject.py b/pypy/objspace/std/setobject.py
--- a/pypy/objspace/std/setobject.py
+++ b/pypy/objspace/std/setobject.py
@@ -576,6 +576,11 @@
 class W_FrozensetObject(W_BaseSetObject):
     hash = 0
 
+    def _cleanup_(self):
+        # in case there are frozenset objects existing during
+        # translation, make sure we don't translate a cached hash
+        self.hash = 0
+
     def is_w(self, space, w_other):
         if not isinstance(w_other, W_FrozensetObject):
             return False
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to