diff options
author | Guido van Rossum <guido@python.org> | 2006-08-19 02:45:06 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2006-08-19 02:45:06 (GMT) |
commit | 1b01e5c706a1fd2bef24ec3e67c41b16423bcd7b (patch) | |
tree | 99388ee6f8a2c56c4ed6808317bfa12829dd3be6 /Lib/xml/dom/xmlbuilder.py | |
parent | 5c303dec170a0c4cb278c819869e652b0832725e (diff) | |
download | cpython-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/dom/xmlbuilder.py')
-rw-r--r-- | Lib/xml/dom/xmlbuilder.py | 4 |
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() |