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/posixpath.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/posixpath.py')
-rw-r--r-- | Lib/posixpath.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/posixpath.py b/Lib/posixpath.py index 0b984f6..a81f508 100644 --- a/Lib/posixpath.py +++ b/Lib/posixpath.py @@ -305,7 +305,7 @@ def expanduser(path): while i < n and path[i] != '/': i = i + 1 if i == 1: - if not os.environ.has_key('HOME'): + if not 'HOME' in os.environ: return path userhome = os.environ['HOME'] else: @@ -343,7 +343,7 @@ def expandvars(path): name = m.group(1) if name[:1] == '{' and name[-1:] == '}': name = name[1:-1] - if os.environ.has_key(name): + if name in os.environ: tail = path[j:] path = path[:i] + os.environ[name] i = len(path) |