GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||
GeezerVison is showing github.com — GH-100762: Don't call `gen.throw()` in `gen.close()`, unless necessary. by markshannon · Pull Request #101013 · python/cpython Conversation
|
|
Using the benchmarks in #101011 (comment), but using |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I guess this will not be easy to backport, as we won't want to change the meaning of oparg in 3.11? Then again it appears to be unused except for the assert. Maybe it should just be a bit indicating whether it's safe to optimize out the throw?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
I think a similar change in 3.11 would actually be simpler: just check if an exception table exists. If not, don't throw. The only reason we need the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Great, it'll just be different. :-) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks @markshannon for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry, @markshannon, I could not cleanly backport this to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I don’t think this should be backported as-is, right? (See my comment above.) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@brandtbucher agreed. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.