Message391908
In this case, if happens that line 10 was the last line of code executing in the body of the with statement.
But the reason it was listed, was that it was statically the last line of code in the body.
If the body is something like:
1. if TRUE:
2. ...
3. else:
4. ...
Then the reported last line will be 4, even though it is never executed.
We can fix this, at the cost of extra compiler complexity and increased bytecode size for the non-exceptional case, but it is very difficult for the exceptional case, because we don't know statically where the exception has come from. |
|
Date |
User |
Action |
Args |
2021-04-26 12:31:03 | Mark.Shannon | set | recipients:
+ Mark.Shannon, nedbat, Anthony Sottile, pablogsal |
2021-04-26 12:31:03 | Mark.Shannon | set | messageid: <1619440263.73.0.986991972188.issue43933@roundup.psfhosted.org> |
2021-04-26 12:31:03 | Mark.Shannon | link | issue43933 messages |
2021-04-26 12:31:03 | Mark.Shannon | create | |
|