<div dir="auto"><div>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.<br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 18, 2019, 5:42 PM Greg Ewing <<a href="mailto:greg.ewing@canterbury.ac.nz">greg.ewing@canterbury.ac.nz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Oleg Broytman wrote:<br>
>    Three-way (tri state) checkbox. You have to distinguish False and<br>
> None if the possible valuse are None, False and True.<br>
<br>
In that case the conventional way to write it would be<br>
<br>
     if settings[MY_KEY] == True:<br>
         ...<br>
<br>
It's not a major issue, but I get nervous when I see code<br>
that assumes True and False are unique, because things<br>
weren't always that way.<br>
<br>
-- <br>
Greg<br>
_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" target="_blank" rel="noreferrer">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer noreferrer" target="_blank">http://python.org/psf/codeofconduct/</a><br>
</blockquote></div></div></div>