[pypy-commit] pypy default: fix fix fix: we must not repeatedly set the quasi-immutable flag to True,

arigo noreply at buildbot.pypy.org
Fri Jan 23 13:31:24 CET 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r75502:98d7d3cb4144
Date: 2015-01-23 13:31 +0100
http://bitbucket.org/pypy/pypy/changeset/98d7d3cb4144/

Log:	fix fix fix: we must not repeatedly set the quasi-immutable flag to
	True, because every time it triggers the logic

diff --git a/pypy/objspace/std/mapdict.py b/pypy/objspace/std/mapdict.py
--- a/pypy/objspace/std/mapdict.py
+++ b/pypy/objspace/std/mapdict.py
@@ -292,7 +292,8 @@
     def delete(self, obj, selector):
         if selector == self.selector:
             # ok, attribute is deleted
-            self.ever_mutated = True
+            if not self.ever_mutated:
+                self.ever_mutated = True
             return self.back.copy(obj)
         new_obj = self.back.delete(obj, selector)
         if new_obj is not None:


More information about the pypy-commit mailing list