Author: Carl Friedrich Bolz <[email protected]>
Branch: detect-immutable-fields
Changeset: r68901:78b5d4b49b56
Date: 2014-01-24 12:11 +0100
http://bitbucket.org/pypy/pypy/changeset/78b5d4b49b56/

Log:    be consistent with adding an attribute: first change the map, then
        write to the object.

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
@@ -40,9 +40,9 @@
         attr = self.find_map_attr(selector)
         if attr is None:
             return self.terminator._write_terminator(obj, selector, w_value)
-        obj._mapdict_write_storage(attr.storageindex, w_value)
         if not attr.ever_mutated:
             attr.ever_mutated = True
+        obj._mapdict_write_storage(attr.storageindex, w_value)
         return True
 
     def delete(self, obj, selector):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to