Implement get_source for importlib.abc.PyLoader using source_path and get_data.

This commit is contained in:
Brett Cannon 2009-03-10 03:29:23 +00:00
parent 28c013dcb4
commit d43b30b046
4 changed files with 59 additions and 10 deletions

View file

@ -226,6 +226,13 @@ are also provided to help in implementing the core ABCs.
:meth:`importlib.abc.InspectLoader.get_code` that creates code objects
from Python source code.
.. method:: get_source(fullname)
A concrete implementation of
:meth:`importlib.abc.InspectLoader.get_source`. Uses
:meth:`importlib.abc.InspectLoader.get_data` and :meth:`source_path` to
get the source code.
.. class:: PyPycLoader