]> granicus.if.org Git - python/commitdiff
Issue #14628: Document the fact that import always returns the module
authorBrett Cannon <brett@python.org>
Fri, 20 Apr 2012 19:57:46 +0000 (15:57 -0400)
committerBrett Cannon <brett@python.org>
Fri, 20 Apr 2012 19:57:46 +0000 (15:57 -0400)
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

index 3bd08942c01b6b67ff447e941fb718a01ed5e815..1b46e42936cd804ace464aed9804e14b39e8ea71 100644 (file)
@@ -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