[issue39149] False positive using operator 'AND' while checking keys on dict()

Leonardo Galani report at bugs.python.org
Sat Dec 28 15:31:46 EST 2019


Leonardo Galani <leo at leonardobg.com.br> added the comment:

I would totally agree if it wasn't for this:

>>> 'a' and 'b' and 'g' in dict
False

The last evaluation is False, making the whole statement False.

but thanks for the documentation link and stackoverflow suggestion.
it sure does make the code more readable.

Happy new year!

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39149>
_______________________________________


More information about the Python-bugs-list mailing list