summaryrefslogtreecommitdiffstats
path: root/Lib/xml/dom/xmlbuilder.py
diff options
context:
space:
mode:
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 ac1d448..dc7c5d4 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()