Message383452
(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? |
|
Date |
User |
Action |
Args |
2020-12-20 21:06:08 | nedbat | set | recipients:
+ nedbat, Mark.Shannon |
2020-12-20 21:06:08 | nedbat | set | messageid: <1608498368.47.0.692310939381.issue42693@roundup.psfhosted.org> |
2020-12-20 21:06:08 | nedbat | link | issue42693 messages |
2020-12-20 21:06:08 | nedbat | create | |
|