diff options
author | Raymond Hettinger <python@rcn.com> | 2002-06-01 14:18:47 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2002-06-01 14:18:47 (GMT) |
commit | 54f0222547b1e92cd018ef132307a6f793dc9505 (patch) | |
tree | 667480d89feb3f9c7ca44e4ffa7bf39e725c120d /Lib/site.py | |
parent | 9d5e4aa4149edb92f6d28c9390d776ae4a1d719a (diff) | |
download | cpython-54f0222547b1e92cd018ef132307a6f793dc9505.zip cpython-54f0222547b1e92cd018ef132307a6f793dc9505.tar.gz cpython-54f0222547b1e92cd018ef132307a6f793dc9505.tar.bz2 |
SF 563203. Replaced 'has_key()' with 'in'.
Diffstat (limited to 'Lib/site.py')
-rw-r--r-- | Lib/site.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/site.py b/Lib/site.py index 770eb52..23c12a0 100644 --- a/Lib/site.py +++ b/Lib/site.py @@ -84,7 +84,7 @@ for dir in sys.path: if dir and not os.path.exists(dir): continue dir, dircase = makepath(dir) - if not _dirs_in_sys_path.has_key(dircase): + if not dircase in _dirs_in_sys_path: L.append(dir) _dirs_in_sys_path[dircase] = 1 sys.path[:] = L @@ -116,7 +116,7 @@ def addsitedir(sitedir): else: reset = 0 sitedir, sitedircase = makepath(sitedir) - if not _dirs_in_sys_path.has_key(sitedircase): + if not sitedircase in _dirs_in_sys_path: sys.path.append(sitedir) # Add path component try: names = os.listdir(sitedir) @@ -153,7 +153,7 @@ def addpackage(sitedir, name): if dir[-1] == '\n': dir = dir[:-1] dir, dircase = makepath(sitedir, dir) - if not _dirs_in_sys_path.has_key(dircase) and os.path.exists(dir): + if not dircase in _dirs_in_sys_path and os.path.exists(dir): sys.path.append(dir) _dirs_in_sys_path[dircase] = 1 if reset: |