[issue39537] Change line number table format
Mark Shannon
report at bugs.python.org
Fri Feb 21 09:33:04 EST 2020
Mark Shannon <mark at hotpy.org> added the comment:
Serhiy,
Although the code generator is syntax directed, not all code has an explicit piece of syntax attached.
For example in the following code:
```
def foo():
if x:
print("yes")
else:
print("no")
```
the compiler emits code to return from the function (LOAD_CONST None; RETURN_VALUE), but there is no explicit return, and no meaningful line number for the return.
Also consider, the artificial try-except block generated for async for loops and the cleanup code for named exception variables.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39537>
_______________________________________
More information about the Python-bugs-list
mailing list