summaryrefslogtreecommitdiffstats
path: root/Doc/reference/simple_stmts.rst
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2012-04-20 19:57:46 (GMT)
committerBrett Cannon <brett@python.org>2012-04-20 19:57:46 (GMT)
commit1b5123aae5632193caace8b1427d767429b6850b (patch)
tree188f851b6b042736cfee72258fe5e706264f3a0c /Doc/reference/simple_stmts.rst
parent1032af95ffc6ec1c288504dfd5321e941e3607d4 (diff)
downloadcpython-1b5123aae5632193caace8b1427d767429b6850b.zip
cpython-1b5123aae5632193caace8b1427d767429b6850b.tar.gz
cpython-1b5123aae5632193caace8b1427d767429b6850b.tar.bz2
Issue #14628: Document the fact that import always returns the module
as found in sys.modules and not as what the loader returns (even though it is required to by PEP 302).
Diffstat (limited to 'Doc/reference/simple_stmts.rst')
-rw-r--r--Doc/reference/simple_stmts.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/reference/simple_stmts.rst b/Doc/reference/simple_stmts.rst
index 3bd0894..1b46e42 100644
--- a/Doc/reference/simple_stmts.rst
+++ b/Doc/reference/simple_stmts.rst
@@ -776,7 +776,8 @@ within the package being imported. :data:`__package__` is optional but should
be set to the name of package that contains the module or package (the empty
string is used for module not contained in a package). :data:`__loader__` is
also optional but should be set to the loader object that is loading the
-module.
+module. While loaders are required to return the module they loaded, import
+itself always retrieves any modules it returns from :data:`sys.modules`.
.. index::
exception: ImportError