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/os2emxpath.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/os2emxpath.py')
-rw-r--r-- | Lib/os2emxpath.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/os2emxpath.py b/Lib/os2emxpath.py index 55f599c..62d5d40 100644 --- a/Lib/os2emxpath.py +++ b/Lib/os2emxpath.py @@ -291,9 +291,9 @@ def expanduser(path): while i < n and path[i] not in '/\\': i = i + 1 if i == 1: - if os.environ.has_key('HOME'): + if 'HOME' in os.environ: userhome = os.environ['HOME'] - elif not os.environ.has_key('HOMEPATH'): + elif not 'HOMEPATH' in os.environ: return path else: try: @@ -347,7 +347,7 @@ def expandvars(path): try: index = path.index('}') var = path[:index] - if os.environ.has_key(var): + if var in os.environ: res = res + os.environ[var] except ValueError: res = res + path @@ -360,7 +360,7 @@ def expandvars(path): var = var + c index = index + 1 c = path[index:index + 1] - if os.environ.has_key(var): + if var in os.environ: res = res + os.environ[var] if c != '': res = res + c |