[Python-checkins] cpython: Add some comments.
brett.cannon
python-checkins at python.org
Sun Apr 15 02:44:30 CEST 2012
http://hg.python.org/cpython/rev/e2f48b076012
changeset: 76309:e2f48b076012
user: Brett Cannon <brett at python.org>
date: Sat Apr 14 18:37:07 2012 -0400
summary:
Add some comments.
files:
Lib/importlib/_bootstrap.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py
--- a/Lib/importlib/_bootstrap.py
+++ b/Lib/importlib/_bootstrap.py
@@ -805,6 +805,7 @@
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 @@
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)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list