On 01/03/17 02:56, 语言破碎处 wrote:
I'm bited once:
>>> '' in {} == False
False
>>> ('' in {}) == False
True
# '' in {} == False ==>> ('' in {}) and ({} == False) ==>> False!
I think only compare operations should be chained.
I think comparing against False (or True) is bad idea. I would
certainly reject any code doing it that came past me for review. Use
"not" instead.
--
Rhodri James *-* Kynesim Ltd
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/