summaryrefslogtreecommitdiffstats
path: root/Lib/xml
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2008-08-04 00:23:58 (GMT)
committerBrett Cannon <bcannon@gmail.com>2008-08-04 00:23:58 (GMT)
commit5dd504df289fba6990ab1ee3a3554cd960850c26 (patch)
tree4ba2984637c58b6c1720e2153e9521c8cc23f631 /Lib/xml
parenta36f8fefb00e11c7a46280eba33bf210c34018f4 (diff)
downloadcpython-5dd504df289fba6990ab1ee3a3554cd960850c26.zip
cpython-5dd504df289fba6990ab1ee3a3554cd960850c26.tar.gz
cpython-5dd504df289fba6990ab1ee3a3554cd960850c26.tar.bz2
Remove dict.has_key() usage in xml.dom.minidom to silence warnings while
running under -3.
Diffstat (limited to 'Lib/xml')
-rw-r--r--Lib/xml/dom/minidom.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/xml/dom/minidom.py b/Lib/xml/dom/minidom.py
index 02e82d9..9f7f62c 100644
--- a/Lib/xml/dom/minidom.py
+++ b/Lib/xml/dom/minidom.py
@@ -245,7 +245,7 @@ class Node(xml.dom.Node):
except AttributeError:
d = {}
self._user_data = d
- if d.has_key(key):
+ if key in d:
old = d[key][0]
if data is None:
# ignore handlers passed for None
@@ -562,7 +562,7 @@ class NamedNodeMap(object):
_clear_id_cache(self._ownerElement)
del self._attrs[n.nodeName]
del self._attrsNS[(n.namespaceURI, n.localName)]
- if n.__dict__.has_key('ownerElement'):
+ if 'ownerElement' in n.__dict__:
n.__dict__['ownerElement'] = None
return n
else:
@@ -574,7 +574,7 @@ class NamedNodeMap(object):
_clear_id_cache(self._ownerElement)
del self._attrsNS[(n.namespaceURI, n.localName)]
del self._attrs[n.nodeName]
- if n.__dict__.has_key('ownerElement'):
+ if 'ownerElement' in n.__dict__:
n.__dict__['ownerElement'] = None
return n
else:
@@ -1664,7 +1664,7 @@ class Document(Node, DocumentLS):
return n
def getElementById(self, id):
- if self._id_cache.has_key(id):
+ if id in self._id_cache:
return self._id_cache[id]
if not (self._elem_info or self._magic_id_count):
return None