summaryrefslogtreecommitdiff
path: root/Lib/tkinter/font.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/tkinter/font.py')
-rw-r--r--Lib/tkinter/font.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/tkinter/font.py b/Lib/tkinter/font.py
index 15ad7ab4b6..a9f79d8e45 100644
--- a/Lib/tkinter/font.py
+++ b/Lib/tkinter/font.py
@@ -100,6 +100,10 @@ class Font:
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