Message394995
Why this occurs:
with cm:
A
break
translates to something like:
ex = cm.__exit__; cm.__enter__() # with cm
A
ex(...)
goto loop_end # break
So, the break is traced after the exit call.
However, this doesn't seem consistent with try-finally statements which trace any break/continue/return before the finally block. |
|
Date |
User |
Action |
Args |
2021-06-03 12:18:54 | Mark.Shannon | set | recipients:
+ Mark.Shannon, nedbat, pablogsal |
2021-06-03 12:18:54 | Mark.Shannon | set | messageid: <1622722734.09.0.990917553939.issue44298@roundup.psfhosted.org> |
2021-06-03 12:18:54 | Mark.Shannon | link | issue44298 messages |
2021-06-03 12:18:53 | Mark.Shannon | create | |
|