Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

`True or b` is always True and differs from `b or True`. `x = True and y` is 
always equivalent to `x = y`.

What is the use case of your optimization? Can you provide examples of real 
code which would benefit from removing all boolean tests (not only the repeated 
one) of non-constants?

If there are not such examples or they are not common, there is no need of this 
optimization. Just revert that changes.

----------

_______________________________________
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