Author: Manuel Jacob <[email protected]>
Branch: py3k
Changeset: r77844:6133e40a4002
Date: 2015-06-03 23:23 +0200
http://bitbucket.org/pypy/pypy/changeset/6133e40a4002/

Log:    Call dict.copy() instead of dict.items() here because dict.items()
        does not copy the contents on Py3k.

diff --git a/pypy/interpreter/mixedmodule.py b/pypy/interpreter/mixedmodule.py
--- a/pypy/interpreter/mixedmodule.py
+++ b/pypy/interpreter/mixedmodule.py
@@ -9,7 +9,7 @@
     applevel_name = None
 
     # The following attribute is None as long as the module has not been
-    # imported yet, and when it has been, it is mod.__dict__.items() just
+    # imported yet, and when it has been, it is mod.__dict__.copy() just
     # after startup().
     w_initialdict = None
     lazy = False
@@ -58,7 +58,7 @@
                 self.save_module_content_for_future_reload()
 
     def save_module_content_for_future_reload(self):
-        self.w_initialdict = self.space.call_method(self.w_dict, 'items')
+        self.w_initialdict = self.space.call_method(self.w_dict, 'copy')
 
 
     def get_applevel_name(cls):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to