mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
#615772: raise a more explicit error from Tkinter.Misc.__contains__.
This commit is contained in:
parent
88659b0ab2
commit
ae019e14bd
1 changed files with 2 additions and 0 deletions
|
@ -1200,6 +1200,8 @@ class Misc:
|
||||||
__getitem__ = cget
|
__getitem__ = cget
|
||||||
def __setitem__(self, key, value):
|
def __setitem__(self, key, value):
|
||||||
self.configure({key: value})
|
self.configure({key: value})
|
||||||
|
def __contains__(self, key):
|
||||||
|
raise TypeError("Tkinter objects don't support 'in' tests.")
|
||||||
def keys(self):
|
def keys(self):
|
||||||
"""Return a list of all resource names of this widget."""
|
"""Return a list of all resource names of this widget."""
|
||||||
return map(lambda x: x[0][1:],
|
return map(lambda x: x[0][1:],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue