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
Comprehension iteration variable overwrite a variable of the same name in the outer scope inside a function with try..except #108654
Labels
3.12
bugs and security fixes
3.13
new features, bugs and security fixes
release-blocker
type-bug
An unexpected behavior, bug, or error
Comments
cc @carljm |
Eclips4
added
3.12
bugs and security fixes
3.13
new features, bugs and security fixes
labels
Aug 29, 2023
carljm
added a commit
to carljm/cpython
that referenced
this issue
Aug 30, 2023
carljm
added a commit
to carljm/cpython
that referenced
this issue
Aug 30, 2023
carljm
added a commit
to carljm/cpython
that referenced
this issue
Aug 30, 2023
carljm
added a commit
that referenced
this issue
Aug 30, 2023
…08659) Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Aug 30, 2023
…on (pythonGH-108659) (cherry picked from commit d52c448) Co-authored-by: Carl Meyer <carl@oddbird.net> Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
This looks completed, but please reopen if not @carljm! |
I can confirm that it's fixed it 3.12.0rc2 🎉 |
serhiy-storchaka
added a commit
to serhiy-storchaka/cpython
that referenced
this issue
Sep 9, 2023
serhiy-storchaka
added a commit
that referenced
this issue
Sep 11, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
3.12
bugs and security fixes
3.13
new features, bugs and security fixes
release-blocker
type-bug
An unexpected behavior, bug, or error
Bug report
Checklist
and am confident this bug has not been reported before
CPython versions tested on:
3.12
Operating systems tested on:
macOS
Output from running 'python -VV' on the command line:
Python 3.12.0rc1 (main, Aug 29 2023, 19:34:25) [Clang 12.0.5 (clang-1205.0.22.9)]
A clear and concise description of the bug:
In the release notes for 3.12.0rc1 there is the following paragraph about comprehension inlining:
I found a case when a comprehension iteration variable overwrite a variable of the same name in the outer scope:
However, if you run this code outside of the function, isolation works:
Linked PRs
The text was updated successfully, but these errors were encountered: