[Python-checkins] r63501 - python/trunk/Lib/lib-tk/Tkinter.py

georg.brandl python-checkins at python.org
Tue May 20 10:48:35 CEST 2008


Author: georg.brandl
Date: Tue May 20 10:48:34 2008
New Revision: 63501

Log:
#615772: raise a more explicit error from Tkinter.Misc.__contains__.


Modified:
   python/trunk/Lib/lib-tk/Tkinter.py

Modified: python/trunk/Lib/lib-tk/Tkinter.py
==============================================================================
--- python/trunk/Lib/lib-tk/Tkinter.py	(original)
+++ python/trunk/Lib/lib-tk/Tkinter.py	Tue May 20 10:48:34 2008
@@ -1200,6 +1200,8 @@
     __getitem__ = cget
     def __setitem__(self, key, value):
         self.configure({key: value})
+    def __contains__(self, key):
+        raise TypeError("Tkinter objects don't support 'in' tests.")
     def keys(self):
         """Return a list of all resource names of this widget."""
         return map(lambda x: x[0][1:],


More information about the Python-checkins mailing list