diff options
Diffstat (limited to 'Lib/tkinter/__init__.py')
-rw-r--r-- | Lib/tkinter/__init__.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py index fec5655..57ac3fb 100644 --- a/Lib/tkinter/__init__.py +++ b/Lib/tkinter/__init__.py @@ -516,15 +516,11 @@ class Variable: self._tk.call("trace", "vinfo", self._name))] def __eq__(self, other): - """Comparison for equality (==). - - Note: if the Variable's master matters to behavior - also compare self._master == other._master - """ if not isinstance(other, Variable): return NotImplemented - return self.__class__.__name__ == other.__class__.__name__ \ - and self._name == other._name + return (self._name == other._name + and self.__class__.__name__ == other.__class__.__name__ + and self._tk == other._tk) class StringVar(Variable): |