Skip to content

Conversation

@bombs-kim
Copy link
Contributor

@bombs-kim bombs-kim commented Nov 12, 2024

As suggested by @ncoghlan:

  • Added test_nonlocal.py
  • Added a Documentation NEWS entry
  • Added a Tests NEWS entry

In tests, I've decided to use simply the variable names, rather than using f.__closure__[0].cell_contents. It seems to me that both approaches can ensure the correct behavior of nonlocal statements and simply using the variable names would make the test code easier to understand. I will change it back to f.__closure__[0].cell_contents if this is not desirable.

@bombs-kim
Copy link
Contributor Author

@ncoghlan Could you give this PR a review?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant