diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-06-03 21:21:03 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-06-03 21:21:03 (GMT) |
commit | 3b95934e0585762661269d41b5a5d79f1b9c2244 (patch) | |
tree | 5666084fb085b1daedb43c6e74c5f5cabd41aed3 /Lib | |
parent | 4653fb556c5dacdbd4d8afadd2f73a6c0b394157 (diff) | |
download | cpython-3b95934e0585762661269d41b5a5d79f1b9c2244.zip cpython-3b95934e0585762661269d41b5a5d79f1b9c2244.tar.gz cpython-3b95934e0585762661269d41b5a5d79f1b9c2244.tar.bz2 |
use a set for membership testing
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/site.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/site.py b/Lib/site.py index cbf3325..9865cc9 100644 --- a/Lib/site.py +++ b/Lib/site.py @@ -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")) |