Closed
Description
In the attached code the debugger never stops at the continue statement when I set a breakpoint there in pdb. With a pytest the continue statement is reported as not covered by the tests. When I uncomment the assignment statement, stopping at the continue in the debugger works and the continue statement is then reported as covered by the tests. When running the program the print statement after the continue is never reached (as you can verify yourself), so the continue statement is reached.
#!/usr/bin/python3
def t():
a = [[1, 2], [2, 3]]
b = [1, 2]
j = 0
p1 = j + 1
for i in range(2):
if ( a [p1][0] != a [j][0]
and ( a [p1][0] != -a [j][0]
or b [0] + b [1] != 0
)
):
#xyzzy = 42
continue
print ('here i am')
if __name__ == '__main__':
t()
Python 3.9.2 on Debian Bullseye.