New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
syntax errors on continuation lines #43468
Comments
This patch modifies syntax error location information The patch is against r46701 and was developed and |
Logged In: YES Note that you cannot give a "|" inside a tuple specification |
Works nicely: >>> (3,
... 8,
... 4 +,
File "<stdin>", line 3 (continuing line 1)
4 +,
^
SyntaxError: invalid syntax The patch does not apply cleanly because of changes in traceback.py, but it is easy to fix. But IMHO, the special casing that checks for the presence of the extra stmt_lineno attribute is not nice at all. I think it would be better if stmt_lineno always was included and equal to lineno in the normal case. Then traceback.py would just check if stmt_lineno differs from lineno, and if so, append the extra '(continuing line %d)' information. |
I'm not sure if this is necessary; you could argue that the syntax error |
msg84825 asks if this is necessary. Strikes me as being six of one, half a dozen of the other. As few people have shown any interest I'm inclined to close this unless someone pops out of the woodwork. |
Closing as noone has responded. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: