Uh oh!
There was an error while loading. Please reload this page.
gh-93691: fix too broad source locations of for statement iterators - #120330
Conversation
Thanks @iritkatriel for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
…tors (pythonGH-120330) (cherry picked from commit 97b69db) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Sorry, @iritkatriel, I could not cleanly backport this to |
GH-120399 is a backport of this pull request to the 3.13 branch. |
…t iterators (pythonGH-120330). (cherry picked from commit 97b69db) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
bedevere-bot
commented
Jun 12, 2024
|
15r10nk
commented
Aug 18, 2024
hi @iritkatriel, I integraded the bytecode changes into executing and was confused why the source-ranges changed for for-loops but not for comprehensions? classFoo:
def__iter__(self):
assertFalsea= [xforxinFoo()]output (Python 3.12.5): Traceback (mostrecentcalllast):
File"/home/frank/projects/executing/codi.py", line5, in<module>a= [xforxinFoo()]
^^^^^^^^^^^^^^^^^^File"/home/frank/projects/executing/codi.py", line3, in__iter__assertFalse^^^^^AssertionErrorIs there a reason for this or have they simply been forgotten? |
iritkatriel
commented
Aug 18, 2024
That a different story. Let's reopen the issue or create a new one for compressions. |
iritkatriel
commented
Aug 19, 2024
New issue: #123142 |
Before this PR the error location covers the entire for-block (with body).