MCPcopy Index your code
hub / github.com/python/cpython / __init__

Method __init__

Lib/importlib/_bootstrap_external.py:1326–1341  ·  view source on GitHub ↗

Initialize with the path to search on and a variable number of 2-tuples containing the loader and the file suffixes the loader recognizes.

(self, path, *loader_details)

Source from the content-addressed store, hash-verified

1324 """
1325
1326 def __init__(self, path, *loader_details):
1327 """Initialize with the path to search on and a variable number of
1328 2-tuples containing the loader and the file suffixes the loader
1329 recognizes."""
1330 loaders = []
1331 for loader, suffixes in loader_details:
1332 loaders.extend((suffix, loader) for suffix in suffixes)
1333 self._loaders = loaders
1334 # Base (directory) path
1335 if not path or path == '.':
1336 self.path = _os.getcwd()
1337 else:
1338 self.path = _path_abspath(path)
1339 self._path_mtime = -1
1340 self._path_cache = set()
1341 self._relaxed_path_cache = set()
1342
1343 def invalidate_caches(self):
1344 """Invalidate the directory mtime."""

Callers

nothing calls this directly

Calls 3

_path_abspathFunction · 0.85
setFunction · 0.85
extendMethod · 0.45

Tested by

no test coverage detected