Skip to content

Python: Add test for variable reference in list comprehension #14851

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

Merged
merged 1 commit into from
Nov 20, 2023

Conversation

RasmusWL
Copy link
Member

@RasmusWL RasmusWL commented Nov 20, 2023

Hopefully @yoff will solve this soon with his work on variable capture 🤞

For reference, I've included the result from the AST viewer for the code below:

x = 42
l = [(x, 43) for _ in [1]]
print(l)

image

@RasmusWL RasmusWL requested a review from a team as a code owner November 20, 2023 15:42
Copy link
Contributor

@yoff yoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@RasmusWL RasmusWL merged commit c8301fc into github:main Nov 20, 2023
@RasmusWL RasmusWL deleted the variable-caputre-list-comprehension branch November 20, 2023 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants