diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2019-08-08 08:42:54 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-08 08:42:54 +0300 |
commit | 662db125cddbca1db68116c547c290eb3943d98e (patch) | |
tree | 06151487dbe4493ef173dd8cc378f4b6cf5c0e4a /Lib/tkinter/__init__.py | |
parent | 4c69be22df3852f17873a74d015528d9a8ae92d6 (diff) | |
download | cpython-git-662db125cddbca1db68116c547c290eb3943d98e.tar.gz |
bpo-37685: Fixed __eq__, __lt__ etc implementations in some classes. (GH-14952)
They now return NotImplemented for unsupported type of the other operand.
Diffstat (limited to 'Lib/tkinter/__init__.py')
-rw-r--r-- | Lib/tkinter/__init__.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py index 9626a2780d..9258484af5 100644 --- a/Lib/tkinter/__init__.py +++ b/Lib/tkinter/__init__.py @@ -484,6 +484,8 @@ class Variable: 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 |