Author: Mark Young <[email protected]>
Branch: fix_module_repr
Changeset: r82474:5f69cc129429
Date: 2016-02-20 15:27 -0500
http://bitbucket.org/pypy/pypy/changeset/5f69cc129429/
Log: Add a comment and fix an unintended change in the comment.
diff --git a/pypy/interpreter/module.py b/pypy/interpreter/module.py
--- a/pypy/interpreter/module.py
+++ b/pypy/interpreter/module.py
@@ -1,5 +1,5 @@
"""
-eodule objects.
+Module objects.
"""
from pypy.interpreter.baseobjspace import W_Root
diff --git a/pypy/module/imp/interp_imp.py b/pypy/module/imp/interp_imp.py
--- a/pypy/module/imp/interp_imp.py
+++ b/pypy/module/imp/interp_imp.py
@@ -86,6 +86,9 @@
return
# force_init is needed to make reload actually reload instead of just
# using the already-present module in sys.modules.
+
+ # If the module is already in sys.modules, it must be a reload, so
+ # we want to reuse (and reinitialize) the existing module object
reuse = space.finditem(space.sys.get('modules'), w_name) is not None
return space.getbuiltinmodule(name, force_init=True, reuse=reuse)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit