summaryrefslogtreecommitdiffstats
path: root/Lib/user.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2002-06-01 14:18:47 (GMT)
committerRaymond Hettinger <python@rcn.com>2002-06-01 14:18:47 (GMT)
commit54f0222547b1e92cd018ef132307a6f793dc9505 (patch)
tree667480d89feb3f9c7ca44e4ffa7bf39e725c120d /Lib/user.py
parent9d5e4aa4149edb92f6d28c9390d776ae4a1d719a (diff)
downloadcpython-54f0222547b1e92cd018ef132307a6f793dc9505.zip
cpython-54f0222547b1e92cd018ef132307a6f793dc9505.tar.gz
cpython-54f0222547b1e92cd018ef132307a6f793dc9505.tar.bz2
SF 563203. Replaced 'has_key()' with 'in'.
Diffstat (limited to 'Lib/user.py')
-rw-r--r--Lib/user.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/user.py b/Lib/user.py
index ee8ed88..d0cb3ed 100644
--- a/Lib/user.py
+++ b/Lib/user.py
@@ -24,11 +24,11 @@ wishes to do different things depending on the Python version.
import os
home = os.curdir # Default
-if os.environ.has_key('HOME'):
+if 'HOME' in os.environ:
home = os.environ['HOME']
elif os.name == 'nt': # Contributed by Jeff Bauer
- if os.environ.has_key('HOMEPATH'):
- if os.environ.has_key('HOMEDRIVE'):
+ if 'HOMEPATH' in os.environ:
+ if 'HOMEDRIVE' in os.environ:
home = os.environ['HOMEDRIVE'] + os.environ['HOMEPATH']
else:
home = os.environ['HOMEPATH']