Issue #15502: Bring the importlib.PathFinder docs and docstring more in line with the new import system documentation, and fix various parts of the new docs that weren't quite right given PEP 420 or were otherwise a bit misleading. Also note the key terminology problem still being discussed in the issue

This commit is contained in:
Nick Coghlan 2012-08-02 23:03:58 +10:00
parent e3376ef6d2
commit 4941774f59
4 changed files with 1446 additions and 1375 deletions

View file

@ -1183,7 +1183,7 @@ class NamespaceLoader:
class PathFinder:
"""Meta path finder for sys.(path|path_hooks|path_importer_cache)."""
"""Meta path finder for sys.path and package __path__ attributes."""
@classmethod
def _path_hooks(cls, path):
@ -1204,10 +1204,10 @@ class PathFinder:
@classmethod
def _path_importer_cache(cls, path):
"""Get the finder for the path from sys.path_importer_cache.
"""Get the finder for the path entry from sys.path_importer_cache.
If the path is not in the cache, find the appropriate finder and cache
it. If no finder is available, store None.
If the path entry is not in the cache, find the appropriate finder
and cache it. If no finder is available, store None.
"""
if path == '':