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 shippo_
Recipients RhinosF1, epaine, serhiy.storchaka, shippo_
Date 2020-12-27.16:21:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
"I personally think that being able to compare whether two tkinter variables point to the same Tk variable is very useful so needs to stay in some form." -- I concur.

"However, I don't see any situation where comparing to see if two tkinter variables are the same Python object would be helpful." -- agreed.

"Therefore, while writing 'a.get() == b.get()' isn't too bad, .." -- it isn't. But "a == b" -> False IS, provided that "a.get() == b.get()" is True.

Serhiy, how about:

> class Variable:
>     ...
>     def is_(self, other):  # or maybe "same_as"
>         return self.__class__.__name__ == other.__class__.__name__ \
>             and self._name == other._name
>     def __eq__(self, other):
>         return self.__class__.__name__ == other.__class__.__name__ \
>             and self.get() == other.get()

Date User Action Args
2020-12-27 16:21:35shippo_setrecipients: + shippo_, serhiy.storchaka, epaine, RhinosF1
2020-12-27 16:21:35shippo_setmessageid: <>
2020-12-27 16:21:35shippo_linkissue42750 messages
2020-12-27 16:21:35shippo_create