[issue16489] importlib find_loader returns a loader for a non existent module

Brett Cannon report at bugs.python.org
Fri Nov 16 19:56:10 CET 2012


Brett Cannon added the comment:

Everything is working as expected; you left out the path argument::

  importlib.find_loader('package.foo', ['package'])

This works the way it does because otherwise we would have to stat every single time from the top level on down and that is extremely costly.

----------
resolution:  -> invalid
status: open -> closed

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


More information about the Python-bugs-list mailing list