-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-44616: Mark all clean up instructions at end of named exception block as artificial #27109
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Would be great if @nedbat could also confirm that this works for coverage
@@ -3312,11 +3312,11 @@ compiler_try_except(struct compiler *c, stmt_ty s) | |||
/* second # body */ | |||
VISIT_SEQ(c, stmt, handler->v.ExceptHandler.body); | |||
compiler_pop_fblock(c, HANDLER_CLEANUP, cleanup_body); | |||
/* name = None; del name; # Mark as artificial */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, the sneaky cleanup. I knew it has to be it!
Thanks @markshannon for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10. |
Sorry, @markshannon, I could not cleanly backport this to |
|
…lock as artificial (pythonGH-27109) (cherry picked from commit e5862f7)
https://bugs.python.org/issue44616