[issue19944] Make importlib.find_spec load packages as needed

Nick Coghlan report at bugs.python.org
Wed Dec 11 13:27:37 CET 2013


Nick Coghlan added the comment:

One function (the current one) promises not to import anything. The other
(the new one) may have side effects, even if it fails to find the module
(any successfully imported parent modules will remain imported).

IIRC, that "no side effects" guarantee was the original reason for the
find_loader/get_loader split and it's a distinction I think is worth
preserving. I just think the obvious name should be closer to
importlib.import_module in semantics, with the "no side effects" version
being the more obscure one.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19944>
_______________________________________


More information about the Python-bugs-list mailing list