mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +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.
This commit is contained in:
parent
156b7f7052
commit
1df56bc059
5 changed files with 27 additions and 11 deletions
|
@ -107,7 +107,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