Kaydet (Commit) 5b3d3729 authored tarafından Brett Cannon's avatar Brett Cannon

Remove dict.has_key() usage in xml.sax to silence warnings under -3.

üst d9636e17
......@@ -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
......
......@@ -294,12 +294,12 @@ class AttributesImpl:
return self._attrs[name]
def getNameByQName(self, name):
if not self._attrs.has_key(name):
if not name in self._attrs:
raise KeyError, name
return name
def getQNameByName(self, name):
if not self._attrs.has_key(name):
if not name in self._attrs:
raise KeyError, name
return name
......@@ -319,7 +319,7 @@ class AttributesImpl:
return self._attrs.keys()
def has_key(self, name):
return self._attrs.has_key(name)
return name in self._attrs
def __contains__(self, name):
return self._attrs.has_key(name)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment