Kaydet (Commit) ae019e14 authored tarafından Georg Brandl's avatar Georg Brandl

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

üst 88659b0a
...@@ -1200,6 +1200,8 @@ class Misc: ...@@ -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:],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment