[3.9] bpo-16781: In 'exec' doc, add 'nonlocal' to 'yield' and 'return' (GH-2446)#24470
Conversation
…honGH-2446) These 3 statements cannot be used at module scope -- nor in exec with one namespace. (cherry picked from commit 0ec57e2) Co-authored-by: Terry Jan Reedy <[email protected]>
|
@dzenanz: Status check is done, and it's a success ✅ . |
|
I am really confused by this mention. Any explanation as to why? I think I proposed a patch to Python years ago, but it was unrelated to this. |
|
A backport PR identical to the original PR based on a tracker issue is not the place to ask questions. Please try python-list, and be more clear about what you are asking, and omit unrelated stuff. |
|
@miss-islington called me out in a comment in this PR. Why? |
|
Sorry, without seeing the bogus @dzenanz mention above, which should have been @terryjreedy , I did not understand your question. I am puzzled too. |
|
It also happened in 3.8 PR, but not in the original one. |
|
Ah. I figured it out. When I merged #24469, I copied the updated current title to replace the original title which github annoying puts in the merge box instead of the current title. When selecting, I accidentally omitted the 9 at the end. PR 2446 is your PR. Sorry. |
|
I 🤣. Mystery resolved! |
These 3 statements cannot be used at module scope -- nor in exec with one namespace.
(cherry picked from commit 0ec57e2)
Co-authored-by: Terry Jan Reedy [email protected]
https://bugs.python.org/issue16781