From 1b5123aae5632193caace8b1427d767429b6850b Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Fri, 20 Apr 2012 15:57:46 -0400 Subject: [PATCH] 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). --- Doc/reference/simple_stmts.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Doc/reference/simple_stmts.rst b/Doc/reference/simple_stmts.rst index 3bd08942c01..1b46e42936c 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