[New-bugs-announce] [issue42750] tkinter.Variable equality consistency
Ivo Shipkaliev
report at bugs.python.org
Sat Dec 26 10:06:16 EST 2020
New submission from Ivo Shipkaliev <ivo.shipkaliev at gmail.com>:
Greetings!
I just noticed:
>>> import tkinter as tk
>>> root = tk.Tk()
>>> str_0 = tk.StringVar()
>>> str_0.set("same value")
>>> str_1 = tk.StringVar()
>>> str_1.set("same value")
So:
>>> str_0.get() == str_1.get()
True
But:
>>> str_0 == str_1
False
So, maybe a Variable should be compared by value, and not by identity (._name) as currently? (please view attached) Does it make sense?
----------
components: Tkinter
files: equality.diff
keywords: patch
messages: 383807
nosy: epaine, serhiy.storchaka, shippo_
priority: normal
severity: normal
status: open
title: tkinter.Variable equality consistency
type: behavior
versions: Python 3.10
Added file: https://bugs.python.org/file49698/equality.diff
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42750>
_______________________________________
More information about the New-bugs-announce
mailing list