Message377475
I believe the block stack is only for catching exceptions. Loops do not interact with the block stack. Only SETUP_FINALLY adds to the block stack:
https://docs.python.org/3/library/dis.html#opcode-SETUP_FINALLY
Meanwhile, loops and conditionals and the like are compiled into goto-like jumps.
There may be some existing solution, but I'm not sure what. Maybe look at the traceback or ast modules. |
|
Date |
User |
Action |
Args |
2020-09-25 02:48:48 | Dennis Sweeney | set | recipients:
+ Dennis Sweeney, gchalony |
2020-09-25 02:48:48 | Dennis Sweeney | set | messageid: <1601002128.64.0.217987969372.issue41850@roundup.psfhosted.org> |
2020-09-25 02:48:48 | Dennis Sweeney | link | issue41850 messages |
2020-09-25 02:48:48 | Dennis Sweeney | create | |
|