A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2009-July/090639.html below:

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

[Python-Dev] Add an ExecutionLoader abc to importlib or to runpy? [Python-Dev] Add an ExecutionLoader abc to importlib or to runpy?Antoine Pitrou solipsis at pitrou.net
Wed Jul 15 12:27:58 CEST 2009
Brett Cannon <brett <at> python.org> writes:
> 
> 
> I implemented get_filename() as specified in PEP 302 for importlib's source
and bytecode loaders and I was starting to create the ABC for importlib.abc,
but then I realized that perhaps the loader should live in runpy instead of
importlib.
> 
> Putting the new ABC in importlib keeps all PEP 302 ABCs in a single spot. But
this addition to the PEP 302 protocols is very specific to runpy and is not
directly required to make imports work (the implementation was just a
reshuffling of pre-existing code from one method to another). I am tempted to
leave the ABC out of importlib and stop at implementing get_filename() for
importlib.abc.PyLoader and PyPycLoader.

I am not sure when this discussion started. Are you replying to a 3 month-old
message of yours? :)

In any case, keeping all import-related ABCs in a single place sounds like a
good idea.
Alternatively, if the method is runpy specific, it doesn't have its place in an
ABC, does it?


Antoine.


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4