summaryrefslogtreecommitdiff
path: root/Lib/webbrowser.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2002-06-01 14:18:47 +0000
committerRaymond Hettinger <python@rcn.com>2002-06-01 14:18:47 +0000
commit54f0222547b1e92cd018ef132307a6f793dc9505 (patch)
tree667480d89feb3f9c7ca44e4ffa7bf39e725c120d /Lib/webbrowser.py
parent9d5e4aa4149edb92f6d28c9390d776ae4a1d719a (diff)
downloadcpython-git-54f0222547b1e92cd018ef132307a6f793dc9505.tar.gz
SF 563203. Replaced 'has_key()' with 'in'.
Diffstat (limited to 'Lib/webbrowser.py')
-rw-r--r--Lib/webbrowser.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py
index 1509b7aa85..5254289301 100644
--- a/Lib/webbrowser.py
+++ b/Lib/webbrowser.py
@@ -312,19 +312,19 @@ if sys.platform[:3] == "os2" and _iscommand("netscape.exe"):
# OK, now that we know what the default preference orders for each
# platform are, allow user to override them with the BROWSER variable.
#
-if os.environ.has_key("BROWSER"):
+if "BROWSER" in os.environ:
# It's the user's responsibility to register handlers for any unknown
# browser referenced by this value, before calling open().
_tryorder = os.environ["BROWSER"].split(os.pathsep)
for cmd in _tryorder:
- if not _browsers.has_key(cmd.lower()):
+ if not cmd.lower() in _browsers:
if _iscommand(cmd.lower()):
register(cmd.lower(), None, GenericBrowser(
"%s '%%s'" % cmd.lower()))
cmd = None # to make del work if _tryorder was empty
del cmd
-_tryorder = filter(lambda x: _browsers.has_key(x.lower())
+_tryorder = filter(lambda x: x.lower() in _browsers
or x.find("%s") > -1, _tryorder)
# what to do if _tryorder is now empty?