Guido van Rossum <gu...@python.org> added the comment:

Hm, I hadn't realized the issue of bool(a) being evaluated once or twice.

The most important side effect that bool(a) can have is raising (as e.g. numpy 
arrays do), not producing random results. Another important side effect might 
be loading some value into a cache.

So I think dropping an *extra* call is fine, while dropping the *only* call is 
not.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42899>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to