diff options
author | Brett Cannon <brett@python.org> | 2012-04-14 22:37:07 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2012-04-14 22:37:07 (GMT) |
commit | 44590e47867e5a1943a6a197f188d8e82e8b3b56 (patch) | |
tree | 76081c1f8bd0edcda49ea9ebf8d9e80f5855bae0 | |
parent | 2217c46a5f314cce1bc78a0763ee866ab6481006 (diff) | |
download | cpython-44590e47867e5a1943a6a197f188d8e82e8b3b56.zip cpython-44590e47867e5a1943a6a197f188d8e82e8b3b56.tar.gz cpython-44590e47867e5a1943a6a197f188d8e82e8b3b56.tar.bz2 |
Add some comments.
-rw-r--r-- | Lib/importlib/_bootstrap.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py index 12b4219..2b5c949 100644 --- a/Lib/importlib/_bootstrap.py +++ b/Lib/importlib/_bootstrap.py @@ -805,6 +805,7 @@ class _FileFinder: else: cache = self._path_cache cache_module = tail_module + # Check if the module is the name of a directory (and thus a package). if cache_module in cache: base_path = _path_join(self.path, tail_module) if _path_isdir(base_path): @@ -816,6 +817,7 @@ class _FileFinder: else: msg = "Not importing directory {}: missing __init__" _warnings.warn(msg.format(base_path), ImportWarning) + # Check for a file w/ a proper suffix exists. for suffix, loader in self.modules: if cache_module + suffix in cache: full_path = _path_join(self.path, tail_module + suffix) |