Uh oh!
There was an error while loading. Please reload this page.
bpo-46042: Improve SyntaxError locations in the symbol table - #30059
Conversation
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* |
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 |
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. |
bedevere-bot
commented
Dec 11, 2021
|
https://bugs.python.org/issue46042