mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
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:
parent
e3376ef6d2
commit
4941774f59
4 changed files with 1446 additions and 1375 deletions
|
@ -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 == '':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue