summaryrefslogtreecommitdiff
path: root/Lib/xml
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-01-30 00:56:33 +0000
committerRaymond Hettinger <python@rcn.com>2003-01-30 00:56:33 +0000
commit6f36010c98525f16cd652dd7326fcdb457f38a13 (patch)
tree446caf011645fe6f6f67cbb1d64b9301530c29f9 /Lib/xml
parentf6d5a38dd6f3156417e0ea8de963d5911ba1c7b9 (diff)
downloadcpython-6f36010c98525f16cd652dd7326fcdb457f38a13.tar.gz
SF patch 672098: Three __contains__ implementations
Contributed by Jp Calderone.
Diffstat (limited to 'Lib/xml')
-rw-r--r--Lib/xml/sax/xmlreader.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/xml/sax/xmlreader.py b/Lib/xml/sax/xmlreader.py
index f1c9d9db2e..9a2361e349 100644
--- a/Lib/xml/sax/xmlreader.py
+++ b/Lib/xml/sax/xmlreader.py
@@ -321,6 +321,9 @@ class AttributesImpl:
def has_key(self, name):
return self._attrs.has_key(name)
+ def __contains__(self, name):
+ return self._attrs.has_key(name)
+
def get(self, name, alternative=None):
return self._attrs.get(name, alternative)