summaryrefslogtreecommitdiffstats
path: root/Lib/xml/sax/xmlreader.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2006-08-19 02:45:06 (GMT)
committerGuido van Rossum <guido@python.org>2006-08-19 02:45:06 (GMT)
commit1b01e5c706a1fd2bef24ec3e67c41b16423bcd7b (patch)
tree99388ee6f8a2c56c4ed6808317bfa12829dd3be6 /Lib/xml/sax/xmlreader.py
parent5c303dec170a0c4cb278c819869e652b0832725e (diff)
downloadcpython-1b01e5c706a1fd2bef24ec3e67c41b16423bcd7b.zip
cpython-1b01e5c706a1fd2bef24ec3e67c41b16423bcd7b.tar.gz
cpython-1b01e5c706a1fd2bef24ec3e67c41b16423bcd7b.tar.bz2
Fix some more has_key() uses. This could really use a tool to automate...
Diffstat (limited to 'Lib/xml/sax/xmlreader.py')
-rw-r--r--Lib/xml/sax/xmlreader.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/Lib/xml/sax/xmlreader.py b/Lib/xml/sax/xmlreader.py
index 1cade65..1763ea4 100644
--- a/Lib/xml/sax/xmlreader.py
+++ b/Lib/xml/sax/xmlreader.py
@@ -294,12 +294,12 @@ class AttributesImpl:
return self._attrs[name]
def getNameByQName(self, name):
- if not self._attrs.has_key(name):
+ if name not in self._attrs:
raise KeyError, name
return name
def getQNameByName(self, name):
- if not self._attrs.has_key(name):
+ if name not in self._attrs:
raise KeyError, name
return name
@@ -318,11 +318,8 @@ class AttributesImpl:
def keys(self):
return self._attrs.keys()
- def has_key(self, name):
- return self._attrs.has_key(name)
-
def __contains__(self, name):
- return self._attrs.has_key(name)
+ return name in self._attrs
def get(self, name, alternative=None):
return self._attrs.get(name, alternative)