commit | b4d895336a4692c95b4533adcc5c63a489e5e4e4 | [log] [tgz] |
---|---|---|
author | Anatoliy Platonov <31926941+p4m-dev@users.noreply.github.com> | Wed Oct 14 13:02:51 2020 +0300 |
committer | GitHub <noreply@github.com> | Wed Oct 14 13:02:51 2020 +0300 |
tree | 0a9cd544bf4082d1db7a3d38c8f2c0f41f4a7ae3 | |
parent | 0cafcd3c56c9475913d8d4fd0223c297dbb70ac6 [diff] [blame] |
bpo-41876: Overload __repr__ for tkinter Font objects (GH-22450)
diff --git a/Lib/tkinter/font.py b/Lib/tkinter/font.py index 15ad7ab..a9f79d8 100644 --- a/Lib/tkinter/font.py +++ b/Lib/tkinter/font.py
@@ -100,6 +100,10 @@ def __str__(self): return self.name + def __repr__(self): + return f"<{self.__class__.__module__}.{self.__class__.__qualname__}" \ + f" object {self.name!r}>" + def __eq__(self, other): if not isinstance(other, Font): return NotImplemented