summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-05-20 08:48:34 (GMT)
committerGeorg Brandl <georg@python.org>2008-05-20 08:48:34 (GMT)
commitae019e14bd808c80f010d800ce09630698b60961 (patch)
tree41533b5ee15f42ad42a0d634e050612ba16b8441 /Lib
parent88659b0ab29c1022ce0b4d95e60ddf515ef43b16 (diff)
downloadcpython-ae019e14bd808c80f010d800ce09630698b60961.zip
cpython-ae019e14bd808c80f010d800ce09630698b60961.tar.gz
cpython-ae019e14bd808c80f010d800ce09630698b60961.tar.bz2
#615772: raise a more explicit error from Tkinter.Misc.__contains__.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/lib-tk/Tkinter.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
index eb8fd44..5e3938d 100644
--- a/Lib/lib-tk/Tkinter.py
+++ b/Lib/lib-tk/Tkinter.py
@@ -1200,6 +1200,8 @@ class Misc:
__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:],