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, 3 insertions, 1 deletions
diff --git a/Lib/tkinter/font.py b/Lib/tkinter/font.py
index eeff454b53..15ad7ab4b6 100644
--- a/Lib/tkinter/font.py
+++ b/Lib/tkinter/font.py
@@ -101,7 +101,9 @@ class Font:
return self.name
def __eq__(self, other):
- return isinstance(other, Font) and self.name == other.name
+ if not isinstance(other, Font):
+ return NotImplemented
+ return self.name == other.name
def __getitem__(self, key):
return self.cget(key)