mirror of
https://github.com/python/cpython.git
synced 2025-09-28 19:25:27 +00:00
Clarify the intention of raising ImportError for importlib.abc.PyLoader.(source|bytecode)_path.
This commit is contained in:
parent
ac62535164
commit
fee82f4f9c
1 changed files with 3 additions and 2 deletions
|
@ -230,7 +230,7 @@ are also provided to help in implementing the core ABCs.
|
||||||
|
|
||||||
An abstract method that returns the path to the source code for a
|
An abstract method that returns the path to the source code for a
|
||||||
module. Should return :keyword:`None` if there is no source code or
|
module. Should return :keyword:`None` if there is no source code or
|
||||||
raise :exc:`ImportError` if the module cannot be found.
|
raise :exc:`ImportError` if the module cannot be handled by the loader.
|
||||||
|
|
||||||
.. method:: get_filename(fullname)
|
.. method:: get_filename(fullname)
|
||||||
|
|
||||||
|
@ -282,7 +282,8 @@ are also provided to help in implementing the core ABCs.
|
||||||
An abstract method which returns the path to the bytecode for the
|
An abstract method which returns the path to the bytecode for the
|
||||||
specified module, if it exists. It returns :keyword:`None`
|
specified module, if it exists. It returns :keyword:`None`
|
||||||
if no bytecode exists (yet).
|
if no bytecode exists (yet).
|
||||||
Raises :exc:`ImportError` if the module is not found.
|
Raises :exc:`ImportError` if the module cannot be handled by the
|
||||||
|
loader.
|
||||||
|
|
||||||
.. method:: get_filename(fullname)
|
.. method:: get_filename(fullname)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue