[issue42246] Implement PEP 626
Mark Shannon
report at bugs.python.org
Tue Nov 3 05:42:59 EST 2020
Mark Shannon <mark at hotpy.org> added the comment:
The following code is completely eliminated by the macros.
1. if 0:
2. secret_debugging_code()
PEP 626 says that all executed lines of code must generate trace events,
so we need to emit an instruction for line 1.
Dead code elimination will remove the `secret_debugging_code()`, but leave the test. The peephole optimiser can then reduce it to a NOP, but won't eliminate it as it is the only instruction for line 1.
----------
stage: patch review ->
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42246>
_______________________________________
More information about the Python-bugs-list
mailing list