Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 062fcac

Browse files
committed
Issue #21438: Document what loaders don't require a module name for
load_module().
1 parent f26702b commit 062fcac

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

Doc/library/importlib.rst

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -887,6 +887,11 @@ find and load modules.
887887

888888
Concrete implementation of :meth:`importlib.abc.SourceLoader.set_data`.
889889

890+
.. method:: load_module(name=None)
891+
892+
Concrete implementation of :meth:`importlib.abc.Loader.load_module` where
893+
specifying the name of the module to load is optional.
894+
890895

891896
.. class:: SourcelessFileLoader(fullname, path)
892897

@@ -921,6 +926,11 @@ find and load modules.
921926
Returns ``None`` as bytecode files have no source when this loader is
922927
used.
923928

929+
.. method:: load_module(name=None)
930+
931+
Concrete implementation of :meth:`importlib.abc.Loader.load_module` where
932+
specifying the name of the module to load is optional.
933+
924934

925935
.. class:: ExtensionFileLoader(fullname, path)
926936

@@ -940,7 +950,7 @@ find and load modules.
940950

941951
Path to the extension module.
942952

943-
.. method:: load_module(fullname)
953+
.. method:: load_module(name=None)
944954

945955
Loads the extension module if and only if *fullname* is the same as
946956
:attr:`name` or is ``None``.

0 commit comments

Comments
 (0)