[issue44816] PEP 626 does not explain the handling of constants, at all.
Brandt Bucher
report at bugs.python.org
Tue Aug 3 12:30:58 EDT 2021
Brandt Bucher <brandtbucher at gmail.com> added the comment:
Thanks for clarifying.
I'm worried, though, that the PEP's emphasis on "*all* lines of code executed and *only* for lines of code that are executed" could be problematic for other optimizations we perform. Consider:
if ( # <--
True # <--
):
pass # <--
I understand why lines 1 and 4 are covered, since PEP 626 defines "if" and "pass" keywords as executable code. But line 2 isn't executed at runtime (it's peepholed into a NOP)... is it a bug that it creates a line event?
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44816>
_______________________________________
More information about the Python-bugs-list
mailing list