Commit 1b5123aa authored by Brett Cannon's avatar Brett Cannon

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).
parent 1032af95
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment