[Python-checkins] r78379 - python/trunk/Lib/xml/sax/xmlreader.py

jack.diederich python-checkins at python.org
Tue Feb 23 20:34:08 CET 2010


Author: jack.diederich
Date: Tue Feb 23 20:34:06 2010
New Revision: 78379

Log:
 issue#6442 use in operator instead of has_key

Modified:
   python/trunk/Lib/xml/sax/xmlreader.py

Modified: python/trunk/Lib/xml/sax/xmlreader.py
==============================================================================
--- python/trunk/Lib/xml/sax/xmlreader.py	(original)
+++ python/trunk/Lib/xml/sax/xmlreader.py	Tue Feb 23 20:34:06 2010
@@ -322,7 +322,7 @@
         return name in self._attrs
 
     def __contains__(self, name):
-        return self._attrs.has_key(name)
+        return name in self._attrs
 
     def get(self, name, alternative=None):
         return self._attrs.get(name, alternative)


More information about the Python-checkins mailing list