Ivo Shipkaliev <ivo.shipkal...@gmail.com> added the comment:
"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() Regards ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42750> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com