From 1b01e5c706a1fd2bef24ec3e67c41b16423bcd7b Mon Sep 17 00:00:00 2001
From: Guido van Rossum <guido@python.org>
Date: Sat, 19 Aug 2006 02:45:06 +0000
Subject: Fix some more has_key() uses.  This could really use a tool to
 automate...

---
 Lib/xml/dom/xmlbuilder.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'Lib/xml/dom/xmlbuilder.py')

diff --git a/Lib/xml/dom/xmlbuilder.py b/Lib/xml/dom/xmlbuilder.py
index ac1d448f01e..dc7c5d47058 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()
-- 
cgit v1.2.3