Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
bpo-46042: Improve SyntaxError locations in the symbol table#30059
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
pablogsal commented Dec 11, 2021 • edited by bedevere-bot
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by bedevere-bot
Uh oh!
There was an error while loading. Please reload this page.
cfbolz commented Dec 11, 2021
Looks good to me! I like the macros and just having |
cfbolz commented Dec 11, 2021
I think we could be even more general. It seems the other two remaining uses of [xforxinrange(10) if (yield) ==5]deff(): frommathimport* |
pablogsal commented Dec 11, 2021 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
The second one is a bit more complex because we would need to identify which of the comprehension generators have a 'yield' inside, but that happens downstream from us in the visitors. |
pablogsal commented Dec 11, 2021
From the second example I have submitted another commit |
cfbolz commented Dec 11, 2021
PyPy has the equivalent of an extra |
pablogsal commented Dec 11, 2021 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
We would need to also know the comprehension type to raise properly, which is a bit messy. Do you have one extra enum or 4 extra ones? Edit: I did a prototype but is quite long so I will do this in another PR |
pablogsal commented Dec 11, 2021
Nevermind, I found a better workaround that is not too inelegant IMHO |
cfbolz commented Dec 11, 2021
Nice, that's a good approach! |
miss-islington commented Dec 11, 2021
Thanks @pablogsal for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10. |
bedevere-bot commented Dec 11, 2021
GH-30064 is a backport of this pull request to the 3.10 branch. |
…H-30059) (cherry picked from commit 59435ee) Co-authored-by: Pablo Galindo Salgado <[email protected]>
bedevere-bot commented Dec 11, 2021
|
… (GH-30064) (cherry picked from commit 59435ee) Co-authored-by: Pablo Galindo Salgado <[email protected]> Co-authored-by: Pablo Galindo Salgado <[email protected]>
https://bugs.python.org/issue46042