[issue21157] Update imp docs for a PEP 451 world

Brett Cannon report at bugs.python.org
Fri Apr 4 21:01:52 CEST 2014


Brett Cannon added the comment:

imp.find_module() might also best be updated to point out that importlib.import_module() exists for those cases where a replacement for sys.path is not necessary.

As for imp.load_module(), it might also be best to admit that import is simply not structured to work like imp.find_module()/imp.load_module() used to assume and to not try to force a replacement into importlib where it would be better for someone on PyPI to come up with a replacement; stdlib doesn't have to be everything to everyone, especially now that import is fully exposed in Python code (imp exists mainly because import used to be behind a veil of C code).

----------

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


More information about the Python-bugs-list mailing list