[Python-checkins] cpython: don't bother keeping a set we'll never use

benjamin.peterson python-checkins at python.org
Wed Apr 18 21:26:02 CEST 2012


http://hg.python.org/cpython/rev/052732bd3c10
changeset:   76406:052732bd3c10
user:        Benjamin Peterson <benjamin at python.org>
date:        Wed Apr 18 15:25:50 2012 -0400
summary:
  don't bother keeping a set we'll never use

files:
  Lib/importlib/_bootstrap.py |  3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)


diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py
--- a/Lib/importlib/_bootstrap.py
+++ b/Lib/importlib/_bootstrap.py
@@ -842,7 +842,8 @@
         # We store two cached versions, to handle runtime changes of the
         # PYTHONCASEOK environment variable.
         self._path_cache = set(contents)
-        self._relaxed_path_cache = set(fn.lower() for fn in contents)
+        if sys.platform.startswith(CASE_INSENSITIVE_PLATFORMS):
+            self._relaxed_path_cache = set(fn.lower() for fn in contents)
 
 
 class _SourceFinderDetails:

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list