Mark Shannon <m...@hotpy.org> added the comment:
Steve, Please don't change the title of the issue. Sure, the optimizer is "inconsistent". Optimizations are applied in some cases, and not in others. That's just how compilers work. The issue here is whether the optimizer is allowed to skip the call to __bool__() if the result doesn't effect the observable effect of running the program. ---------- title: Inconsistent elimination of empty blocks by optimizer causes __bool__calls to be skipped in some exception handling scenarios -> Is it legal to eliminate tests of a value, when that test has no effect on control flow _______________________________________ 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