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

Xavier de Gaye report at bugs.python.org
Fri Nov 16 20:47:09 CET 2012


Xavier de Gaye added the comment:

> Not necessarily.  The fact that there is nothing to load doesn't
> mean it isn't the right loader if there *was* something to load.

But it is not even the right loader if there *was* something to load,
as get_filename() returns './foo.py' which is wrong even if
mypackage/foo.py had existed.  It should have returned
'./mypackage/foo.py' to be an acceptable loader for a would-be
mypackage.foo module.

----------

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


More information about the Python-bugs-list mailing list