[issue37500] 3.8.0b2 no longer optimizes away "if 0:" ?

Stefan Behnel report at bugs.python.org
Fri Jul 5 16:23:43 EDT 2019


Stefan Behnel <stefan_ml at behnel.de> added the comment:

> it should not be rely upon

IMHO, the correct behaviour under coverage analysis is to keep the code and not discard it. After all, it is code that exists, and that is not being executed, so it should count as uncovered code. The fact that some Python versions can detect at compile time that it will never be executed, and thus discard it ahead of time, should not have an impact on the coverage analysis.

----------
nosy: +scoder

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


More information about the Python-bugs-list mailing list