From: Brett Cannon Date: Fri, 9 May 2014 15:55:49 +0000 (-0400) Subject: Issue #21438: Document what loaders don't require a module name for X-Git-Tag: v3.5.0a1~1712^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=062fcac9a41fb6c89c8edc423ee4d364b79edcf5;p=python Issue #21438: Document what loaders don't require a module name for load_module(). --- diff --git a/Doc/library/importlib.rst b/Doc/library/importlib.rst index afdae9e0f0..09a5d710b5 100644 --- a/Doc/library/importlib.rst +++ b/Doc/library/importlib.rst @@ -887,6 +887,11 @@ find and load modules. Concrete implementation of :meth:`importlib.abc.SourceLoader.set_data`. + .. method:: load_module(name=None) + + Concrete implementation of :meth:`importlib.abc.Loader.load_module` where + specifying the name of the module to load is optional. + .. class:: SourcelessFileLoader(fullname, path) @@ -921,6 +926,11 @@ find and load modules. Returns ``None`` as bytecode files have no source when this loader is used. + .. method:: load_module(name=None) + + Concrete implementation of :meth:`importlib.abc.Loader.load_module` where + specifying the name of the module to load is optional. + .. class:: ExtensionFileLoader(fullname, path) @@ -940,7 +950,7 @@ find and load modules. Path to the extension module. - .. method:: load_module(fullname) + .. method:: load_module(name=None) Loads the extension module if and only if *fullname* is the same as :attr:`name` or is ``None``.