[Python-ideas] True and False are singletons

Greg Ewing greg.ewing at canterbury.ac.nz
Mon Mar 18 07:27:04 EDT 2019


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]:
         ...

-- 
Greg


More information about the Python-ideas mailing list