use a set for membership testing

This commit is contained in:
Benjamin Peterson 2010-06-03 21:21:03 +00:00
parent 4653fb556c
commit 3b95934e05
1 changed files with 2 additions and 2 deletions

View File

@ -276,12 +276,12 @@ def getsitepackages():
environment, and will return a list of full paths.
"""
sitepackages = []
seen = []
seen = set()
for prefix in PREFIXES:
if not prefix or prefix in seen:
continue
seen.append(prefix)
seen.add(prefix)
if sys.platform in ('os2emx', 'riscos'):
sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))