Kaydet (Commit) 3b95934e authored tarafından Benjamin Peterson's avatar Benjamin Peterson

use a set for membership testing

üst 4653fb55
...@@ -276,12 +276,12 @@ def getsitepackages(): ...@@ -276,12 +276,12 @@ def getsitepackages():
environment, and will return a list of full paths. environment, and will return a list of full paths.
""" """
sitepackages = [] sitepackages = []
seen = [] seen = set()
for prefix in PREFIXES: for prefix in PREFIXES:
if not prefix or prefix in seen: if not prefix or prefix in seen:
continue continue
seen.append(prefix) seen.add(prefix)
if sys.platform in ('os2emx', 'riscos'): if sys.platform in ('os2emx', 'riscos'):
sitepackages.append(os.path.join(prefix, "Lib", "site-packages")) sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment