On Tue, Mar 19, 2019 at 12:27:04AM +1300, Greg Ewing 
<greg.ew...@canterbury.ac.nz> wrote:
> Juancarlo A?ez wrote:
> 
> >    if settings[MY_KEY] is True:
> >        ...
> 
> If I saw code like this, it would take a really good argument to
> convince me that it shouldn't be just
> 
>     if settings[MY_KEY]:
>         ...

   Three-way (tri state) checkbox. You have to distinguish False and
None if the possible valuse are None, False and True.

> -- 
> Greg

Oleg.
-- 
    Oleg Broytman            https://phdru.name/            p...@phdru.name
           Programmers don't die, they just GOSUB without RETURN.
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to