[issue19944] Make importlib.find_spec load packages as needed

Nick Coghlan report at bugs.python.org
Thu Dec 12 00:41:59 CET 2013


Nick Coghlan added the comment:

Actually, I think you make a good point. importlib.find_spec should use the
*import_module* signature (no path parameter, but with support for relative
imports). If it is exposed at all, the "one level only" single step version
should appear in importlib.machinery, not at the top level.

The current API exposes an implementation detail most users aren't going to
care about, but a "let me know if it exists but don't import it yet" API
that parallels the full dynamic import API is far more intuitive.

----------

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


More information about the Python-bugs-list mailing list