mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
gh-140481: Improve error message when trying to iterate a Tk widget, image or font (GH-140501)
This commit is contained in:
parent
ad0a3f733b
commit
09b1f10ef7
6 changed files with 59 additions and 22 deletions
|
|
@ -114,6 +114,8 @@ def __getitem__(self, key):
|
|||
def __setitem__(self, key, value):
|
||||
self.configure(**{key: value})
|
||||
|
||||
__iter__ = None # prevent using __getitem__ for iteration
|
||||
|
||||
def __del__(self):
|
||||
try:
|
||||
if self.delete_font:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue