comparison Python/Python-ast.c @ 76329:005fd1fe31ab

Issue #14582: Import returns the module returned by a loader instead of sys.modules when possible. This is being done for two reasons. One is to gain a little bit of performance by skipping an unnecessary dict lookup in sys.modules. But the other (and main) reason is to be a little bit more clear in how things should work from the perspective of import's interactions with loaders. Otherwise loaders can easily forget to return the module even though PEP 302 explicitly states they are expected to return the module they loaded.
author Brett Cannon <brett@python.org>
date Sun, 15 Apr 2012 15:24:04 -0400
parents 9e7f6ddc0d76
children f4d7ad6c9d6e
comparison
equal deleted inserted replaced
76328:c9fb9f5e16e7 76329:005fd1fe31ab