diff options
Diffstat (limited to 'Lib/tkinter/font.py')
-rw-r--r-- | Lib/tkinter/font.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/tkinter/font.py b/Lib/tkinter/font.py index eeff454..15ad7ab 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) |