[Import-SIG] PEP 420 issue: extend_path

Nick Coghlan ncoghlan at gmail.com
Wed May 9 03:01:30 CEST 2012


On Wed, May 9, 2012 at 10:16 AM, Eric V. Smith <eric at trueblade.com> wrote:
> In the pep-420 branch I've checked in code where find_loader() returns
> (loader, list_of_portions). I've implemented it for the FileFinder and
> zipimport.
>
> loader can be None or a loader object.
> list_of_portions can be an empty list, or a list of strings.
>
> To indicate "no loader or portions found", return (None, []).
>
> If loader is not None, list_of_portions is ignored.
>
> I'm pretty happy with this API. Comments welcome.

Yeah, I think that works well and covers all the even vaguely
reasonable cases. Besides, any desire for truly exotic import
behaviour can always be handled via sys.meta_path.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Import-SIG mailing list