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).
This commit is contained in:
Brett Cannon 2012-04-20 15:57:46 -04:00
parent 1032af95ff
commit 1b5123aae5
1 changed files with 2 additions and 1 deletions

View 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