summaryrefslogtreecommitdiffstats
path: root/Lib/xml/sax
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-01-30 00:56:33 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-01-30 00:56:33 (GMT)
commit0e449234bf8e68dfe96af727e2ce7a53fb4f0dad (patch)
treed6da9386cefa8adbe0a93b151ce70dbb976c2ed1 /Lib/xml/sax
parent61bb35f440773d5c67f4054c5148be299232cba3 (diff)
downloadcpython-0e449234bf8e68dfe96af727e2ce7a53fb4f0dad.zip
cpython-0e449234bf8e68dfe96af727e2ce7a53fb4f0dad.tar.gz
cpython-0e449234bf8e68dfe96af727e2ce7a53fb4f0dad.tar.bz2
SF patch 672098: Three __contains__ implementations
Contributed by Jp Calderone.
Diffstat (limited to 'Lib/xml/sax')
-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 f1c9d9d..9a2361e 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)