mirror of
https://github.com/python/cpython.git
synced 2025-08-09 03:19:15 +00:00
bpo-42759: Fix equality comparison of Variable and Font in Tkinter (GH-23968)
Objects which belong to different Tcl interpreters are now always
different, even if they have the same name.
(cherry picked from commit 1df56bc059
)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
parent
7bdb3e0825
commit
578caafabe
5 changed files with 27 additions and 11 deletions
|
@ -103,7 +103,7 @@ class Font:
|
|||
def __eq__(self, other):
|
||||
if not isinstance(other, Font):
|
||||
return NotImplemented
|
||||
return self.name == other.name
|
||||
return self.name == other.name and self._tk == other._tk
|
||||
|
||||
def __getitem__(self, key):
|
||||
return self.cget(key)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue