Fix some more has_key() uses. This could really use a tool to automate...

This commit is contained in:
Guido van Rossum 2006-08-19 02:45:06 +00:00
parent 5c303dec17
commit 1b01e5c706
6 changed files with 18 additions and 21 deletions

View file

@ -59,7 +59,7 @@ if _false:
import xml.sax.expatreader
import os, sys
if os.environ.has_key("PY_SAX_PARSER"):
if "PY_SAX_PARSER" in os.environ:
default_parser_list = os.environ["PY_SAX_PARSER"].split(",")
del os
@ -81,7 +81,7 @@ def make_parser(parser_list = []):
return _create_parser(parser_name)
except ImportError,e:
import sys
if sys.modules.has_key(parser_name):
if parser_name in sys.modules:
# The parser module was found, but importing it
# failed unexpectedly, pass this exception through
raise