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 — bpo-45834: Move runtime 'except:' check to the parser by pablogsal · Pull Request #29625 · python/cpython Conversation
|
|
LGTM based on the tests but I’m not a good reviewer for the parser. |
Sorry, something went wrong.
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.
LGTM!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if (!handler->v.ExceptHandler.type && i < n-1) { | ||
| return compiler_error(c, "default 'except:' must be last"); | ||
| } | ||
| assert(handler->v.ExceptHandler.type || i >= n-1); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Do we also need to add this check to the AST validator? (since it might lead to crashes when compiling manually crafted AST objects).
Sorry, something went wrong.
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.
Yup, what makes me think that maybe this change is not worth it because I find this PR much more complex than what we currently have
Sorry, something went wrong.
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.
Before making a decision about this PR, could you please look at the parser change for except* on #29581 ?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Let's close this if it's not worth doing. |
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.