Eric Snow <ericsnowcurren...@gmail.com> added the comment:

_find_and_load() in importlib._bootstrap returns whatever the loader returns, 
which is the new module object.  The old code in import.c pulled it from 
sys.modules rather than using what the loader returned.  In both cases the 
respective object is what eventually gets bound to the name in the eval loop.

FWIW, the language reference says, "The first form of import statement binds 
the module name in the local namespace to the module object".    This looks 
like a corner case where backwards-compatibility breaks (when we finally start 
enforcing the rules).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14609>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to