This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author nedbat
Recipients Mark.Shannon, nedbat
Date 2020-12-20.21:06:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1608498368.47.0.692310939381.issue42693@roundup.psfhosted.org>
In-reply-to
Content
(Using CPython commit c95f8bc270.)

This program has an "if 0:" line that becomes a NOP bytecode.  It didn't used to in Python 3.9

print(1)
if 0:               # line 2
    print(3)
print(4)

Using a simple trace program (https://github.com/nedbat/coveragepy/blob/master/lab/run_trace.py), it produces this output:

call <string> 1 @-1
    line <string> 1 @0
1
    line <string> 2 @8
    line <string> 4 @10
4
    return <string> 4 @20

Using Python3.9 gives this output:

call <string> 1 @-1
    line <string> 1 @0
1
    line <string> 4 @8
4
    return <string> 4 @18

Is this change intentional?
History
Date User Action Args
2020-12-20 21:06:08nedbatsetrecipients: + nedbat, Mark.Shannon
2020-12-20 21:06:08nedbatsetmessageid: <1608498368.47.0.692310939381.issue42693@roundup.psfhosted.org>
2020-12-20 21:06:08nedbatlinkissue42693 messages
2020-12-20 21:06:08nedbatcreate