Brett Cannon <br...@python.org> added the comment:

What do you mean the loader is only needed to set __loader__? You need the 
loader to create the module (or find it in sys.modules to reload), and set all 
the attributes properly. If you do this then reloading namespace modules will 
become a special case compared to other loaders as imp.reload() calls 
module.__loader__.load_module().

This also prevents the creation of an importlib.find_module() which would 
return the loader to replace imp.find_module() since you now split the API.

I realize the finder/loader dichotomy seems superfluous (and most of the time 
it is), but it has already been heavily exposed and relied on and deviating 
from it for namespace modules runs the risk of hurting introspection.

----------

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

Reply via email to