This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients epaine, serhiy.storchaka, shippo_
Date 2020-12-26.18:31:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
a = tk.IntVar(name='a')
b = tk.IntVar(name='a')
assert a == b  # they refers to the same variable
assert a is not b  # but they are different objects
a.set(42); assert b.get() == a.get() == 42  # yes, it is the same variable
c = tk.IntVar(name='c', value=42)
assert c != a  # they are different variables
assert c.get() == a.get() == 42  # although having equal values
a.set(43); assert c.get() != a.get() == 43  # and setting one does not affect other

I do not see good reasons for making Tk variables comparable by value instead of name.
Date User Action Args
2020-12-26 18:31:56serhiy.storchakasetrecipients: + serhiy.storchaka, epaine, shippo_
2020-12-26 18:31:56serhiy.storchakasetmessageid: <>
2020-12-26 18:31:56serhiy.storchakalinkissue42750 messages
2020-12-26 18:31:56serhiy.storchakacreate