Author: Carl Friedrich Bolz <cfb...@gmx.de>
Branch: list-strategies
Changeset: r47682:5424c31be23f
Date: 2011-09-29 16:23 +0200
http://bitbucket.org/pypy/pypy/changeset/5424c31be23f/

Log:    fix a space.is_w(..., None) case

diff --git a/pypy/objspace/std/celldict.py b/pypy/objspace/std/celldict.py
--- a/pypy/objspace/std/celldict.py
+++ b/pypy/objspace/std/celldict.py
@@ -65,11 +65,11 @@
         if isinstance(cell, ModuleCell):
             cell.w_value = w_value
             return
-        # If the new value and the current value are the same, don't create a
-        # level of indirection, or mutate are version.
-        if self.space.is_w(w_value, cell):
-            return
         if cell is not None:
+            # If the new value and the current value are the same, don't 
create a
+            # level of indirection, or mutate the version.
+            if self.space.is_w(w_value, cell):
+                return
             w_value = ModuleCell(w_value)
         self.mutated()
         self.unerase(w_dict.dstorage)[key] = w_value
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to