diff --git a/Doc/library/importlib.rst b/Doc/library/importlib.rst index ae0fe6b1574..0c8b8e8ec02 100644 --- a/Doc/library/importlib.rst +++ b/Doc/library/importlib.rst @@ -751,7 +751,7 @@ find and load modules. The path the finder will search in. - .. method:: find_module(fullname) + .. method:: find_loader(fullname) Attempt to find the loader to handle *fullname* within :attr:`path`. diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py index 37fe08310de..67304a38d96 100644 --- a/Lib/importlib/_bootstrap.py +++ b/Lib/importlib/_bootstrap.py @@ -1361,12 +1361,12 @@ class FileFinder: """ - def __init__(self, path, *details): + def __init__(self, path, *loader_details): """Initialize with the path to search on and a variable number of 2-tuples containing the loader and the file suffixes the loader recognizes.""" loaders = [] - for loader, suffixes in details: + for loader, suffixes in loader_details: loaders.extend((suffix, loader) for suffix in suffixes) self._loaders = loaders # Base (directory) path