diff options
author | Brett Cannon <brett@python.org> | 2016-07-08 18:09:35 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2016-07-08 18:09:35 (GMT) |
commit | 3fef2eef2e5422a06e788d9239205b61a5f4eea1 (patch) | |
tree | 8d638ab854d2dbfce0510d6febe56ae0e72d2537 /Lib/importlib/_bootstrap_external.py | |
parent | fdcdd9ed80d2b4bf7e7dac04ed2d22e9cb747ff6 (diff) | |
download | cpython-3fef2eef2e5422a06e788d9239205b61a5f4eea1.zip cpython-3fef2eef2e5422a06e788d9239205b61a5f4eea1.tar.gz cpython-3fef2eef2e5422a06e788d9239205b61a5f4eea1.tar.bz2 |
Issue #26972: Fix some mistakes in importlib-related docstrings.
Thanks to Oren Milman for the patch.
Diffstat (limited to 'Lib/importlib/_bootstrap_external.py')
-rw-r--r-- | Lib/importlib/_bootstrap_external.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Lib/importlib/_bootstrap_external.py b/Lib/importlib/_bootstrap_external.py index 30e8330..a4805f3 100644 --- a/Lib/importlib/_bootstrap_external.py +++ b/Lib/importlib/_bootstrap_external.py @@ -1048,11 +1048,7 @@ class PathFinder: @classmethod def _path_hooks(cls, path): - """Search sequence of hooks for a finder for 'path'. - - If 'hooks' is false then use sys.path_hooks. - - """ + """Search sys.path_hooks for a finder for 'path'.""" if sys.path_hooks is not None and not sys.path_hooks: _warnings.warn('sys.path_hooks is empty', ImportWarning) for hook in sys.path_hooks: @@ -1134,8 +1130,10 @@ class PathFinder: @classmethod def find_spec(cls, fullname, path=None, target=None): - """find the module on sys.path or 'path' based on sys.path_hooks and - sys.path_importer_cache.""" + """Try to find a spec for 'fullname' on sys.path or 'path'. + + The search is based on sys.path_hooks and sys.path_importer_cache. + """ if path is None: path = sys.path spec = cls._get_spec(fullname, path, target) @@ -1215,8 +1213,10 @@ class FileFinder: submodule_search_locations=smsl) def find_spec(self, fullname, target=None): - """Try to find a spec for the specified module. Returns the - matching spec, or None if not found.""" + """Try to find a spec for the specified module. + + Returns the matching spec, or None if not found. + """ is_namespace = False tail_module = fullname.rpartition('.')[2] try: |