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

This commit is contained in:
Georg Brandl 2008-05-20 08:48:34 +00:00
parent 88659b0ab2
commit ae019e14bd
1 changed files with 2 additions and 0 deletions

View File

@ -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:],