It was a VERY long time ago when True and False were not singletons. I
don't think we should still try to write code based on rules that stopped
applying more than a decade ago.
On Mon, Mar 18, 2019, 5:42 PM Greg Ewing
Oleg Broytman wrote:
Three-way (tri state) checkbox. You have to distinguish False and None if the possible valuse are None, False and True.
In that case the conventional way to write it would be
if settings[MY_KEY] == True: ...
It's not a major issue, but I get nervous when I see code that assumes True and False are unique, because things weren't always that way.
-- Greg _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/