[Python-Dev] Add an ExecutionLoader abc to importlib or to runpy?

Paul Moore p.f.moore at gmail.com
Wed Jul 15 17:21:12 CEST 2009


2009/7/15 Nick Coghlan <ncoghlan at gmail.com>:
> While runpy is the only client in the standard library for the
> get_filename() method, the method is still a PEP 302 extension. I
> documented the extension in the PEP as loaders are the only things
> reliably in a position to provide the filename details that runpy needs
> to set __file__ and sys.argv[0] correctly and until importlib came along
> PEP 302 itself was the only real documentation of that API.

Yes, sorry about that :-)

> Since importlib is now the "go-to" location for people that want to
> write their own PEP 302 importers and loaders, I would say that it is
> also the right place for the new ExecutionLoader ABC.

Agreed. (But I said that before...)

Paul.


More information about the Python-Dev mailing list