diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-04-04 15:45:02 +0300 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-04-04 15:45:02 +0300 |
commit | 1b9f43b8fa502dc422c4f89d4591eba3114e2434 (patch) | |
tree | 4b32c4681d5d23a157311fd725fa350a9cf79f9d /Lib/tkinter/__init__.py | |
parent | 06b466b137bd4d186c26542976ffc90012c00824 (diff) | |
download | cpython-1b9f43b8fa502dc422c4f89d4591eba3114e2434.tar.gz |
Issue #20636: Improved the repr of Tkinter widgets.
Diffstat (limited to 'Lib/tkinter/__init__.py')
-rw-r--r-- | Lib/tkinter/__init__.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py index 4ac4e57ad2..f60923ad27 100644 --- a/Lib/tkinter/__init__.py +++ b/Lib/tkinter/__init__.py @@ -1280,6 +1280,11 @@ class Misc: def __str__(self): """Return the window path name of this widget.""" return self._w + + def __repr__(self): + return '<%s.%s object %s>' % ( + self.__class__.__module__, self.__class__.__qualname__, self._w) + # Pack methods that apply to the master _noarg_ = ['_noarg_'] def pack_propagate(self, flag=_noarg_): |