[issue14551] imp.load_source docs removed from python3 docs...is this correct?

Brett Cannon report at bugs.python.org
Mon Apr 16 23:13:45 CEST 2012


Brett Cannon <brett at python.org> added the comment:

Well, I want backwards-compatibility *now*, not forever.

And no, it is not an obvious API as you are asking for what loaders are supposed to do; load a module, which is why the one-liner I gave you works today. Finder simply find a loader that can load something that they are asked to discover. Loader then load something that they are told to load, whether it was found through a finder for sys.path or explicitly pointed at something.

Another option is to have SourceFileLoader.load_module() take no argument since its constructor already has everything needed to load a module passed in which simplifies the API a little bit. But that would be a non-standard broadening of the loader API and I don't know if people will like that.

----------

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


More information about the Python-bugs-list mailing list