[issue42693] "if 0:" lines are traced; they didn't use to be

Benjamin Peterson report at bugs.python.org
Tue Dec 22 22:42:04 EST 2020


Benjamin Peterson <benjamin at python.org> added the comment:

Maybe sys.settrace() is not ultimately the best tool for coverage reporting? If the bytecode compiler natively supported coverage instrumentation, source semantics would be easier to respect. A nice implementation could use Knuth & Stevenson "Optimal measurement of points for program frequency counts".

----------
nosy: +benjamin.peterson

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


More information about the Python-bugs-list mailing list