diff -r 66a1fbdbe4bb Lib/importlib/_bootstrap.py --- a/Lib/importlib/_bootstrap.py Thu May 05 16:21:35 2016 +0300 +++ b/Lib/importlib/_bootstrap.py Sat May 07 18:06:57 2016 +0300 @@ -270,7 +270,7 @@ # Module specifications ####################################################### def _module_repr(module): - # The implementation of ModuleType__repr__(). + # The implementation of ModuleType.__repr__(). loader = getattr(module, '__loader__', None) if hasattr(loader, 'module_repr'): # As soon as BuiltinImporter, FrozenImporter, and NamespaceLoader @@ -603,7 +603,8 @@ # Used by importlib.reload() and _load_module_shim(). def _exec(spec, module): - """Execute the spec in an existing module's namespace.""" + """Execute the module specified by the spec in an existing + module's namespace.""" name = spec.name _imp.acquire_lock() with _ModuleLockManager(name): @@ -877,7 +878,7 @@ def _find_spec(name, path, target=None): - """Find a module's loader.""" + """Find a module's spec.""" meta_path = sys.meta_path if meta_path is None: # PyImport_Cleanup() is running or has been called. diff -r 66a1fbdbe4bb Lib/importlib/_bootstrap_external.py --- a/Lib/importlib/_bootstrap_external.py Thu May 05 16:21:35 2016 +0300 +++ b/Lib/importlib/_bootstrap_external.py Sat May 07 18:06:57 2016 +0300 @@ -1044,11 +1044,7 @@ @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: @@ -1130,8 +1126,8 @@ @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', + based on sys.path_hooks and sys.path_importer_cache.""" if path is None: path = sys.path spec = cls._get_spec(fullname, path, target) @@ -1211,8 +1207,7 @@ submodule_search_locations=smsl) def find_spec(self, fullname, target=None): - """Try to find a loader for the specified module, or the namespace - package portions. Returns (loader, list-of-portions).""" + """Try to find a spec to handle 'fullname' within self.path.""" is_namespace = False tail_module = fullname.rpartition('.')[2] try: