summaryrefslogtreecommitdiff
path: root/Lib/xml/dom/xmlbuilder.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-10-09 22:15:50 +0000
committerBenjamin Peterson <benjamin@python.org>2009-10-09 22:15:50 +0000
commit6e3dbbdf39f3b4eb6f18c0165e446df17218b7dc (patch)
tree09bb1d277d25af8ed32f042ff8fce5549105bc76 /Lib/xml/dom/xmlbuilder.py
parentde0559998fef231efc9ecbdef5b3a195d4eaa28d (diff)
downloadcpython-git-6e3dbbdf39f3b4eb6f18c0165e446df17218b7dc.tar.gz
replace has_key with 'in' operator
Diffstat (limited to 'Lib/xml/dom/xmlbuilder.py')
-rw-r--r--Lib/xml/dom/xmlbuilder.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/xml/dom/xmlbuilder.py b/Lib/xml/dom/xmlbuilder.py
index ac1d448f01..dc7c5d4705 100644
--- a/Lib/xml/dom/xmlbuilder.py
+++ b/Lib/xml/dom/xmlbuilder.py
@@ -91,7 +91,7 @@ class DOMBuilder:
def canSetFeature(self, name, state):
key = (_name_xform(name), state and 1 or 0)
- return self._settings.has_key(key)
+ return key in self._settings
# This dictionary maps from (feature,value) to a list of
# (option,value) pairs that should be set on the Options object.
@@ -247,7 +247,7 @@ class DOMEntityResolver(object):
def _guess_media_encoding(self, source):
info = source.byteStream.info()
- if info.has_key("Content-Type"):
+ if "Content-Type" in info:
for param in info.getplist():
if param.startswith("charset="):
return param.split("=", 1)[1].lower()