From: Benjamin Peterson Date: Wed, 18 Apr 2012 19:25:50 +0000 (-0400) Subject: don't bother keeping a set we'll never use X-Git-Tag: v3.3.0a3~158 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2a481e58ffe7d7719b856e2778751521d266d33a;p=python don't bother keeping a set we'll never use --- diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py index 142461aaf2..6478db5d23 100644 --- a/Lib/importlib/_bootstrap.py +++ b/Lib/importlib/_bootstrap.py @@ -842,7 +842,8 @@ class _FileFinder: # 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: