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-85427: Prevent exits if `ArgumentParser.exit_on_error` is False by jacobtylerwalls · Pull Request #30832 · python/cpython Conversation
|
|
Looking inside |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
There are other calls to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
I found a duplicate with some more discussion: bpo-41255. From the penultimate comment:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
ArgumentParser.exit_on_error is FalseArgumentParser.exit_on_error is False
ArgumentParser.exit_on_error is FalseArgumentParser.exit_on_error is False
|
Alternative to #27295 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Backref to #85427 (@jacobtylerwalls please could you update the title to start with gh-85427?). A |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
ArgumentParser.exit_on_error is FalseArgumentParser.exit_on_error is False
There was an error while loading. Please reload this page.
|
@JelleZijlstra Forgive the ping! I just I noticed a duplicate issue (#103498) and PR (#103519) rolled in for this. Do you have a reviewer you might recommend to take a look? Where we left off was comparing 1.) guarding the calls to
I was somewhat convinced by the comment quoted in #30832 (comment). Plus it's more backwards compatible to leave |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@sobolevn and @barneygale expressed some interest in argparse issues recently. I don't feel strongly here but I'll try to find some time to read up again and form an opinion. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Also closes: #103498 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
So, we have at least two PRs that do opposite things. Now, we need to decide what is better :) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thank you for your contribution @jacobtylerwalls. I apologize for the fact that this PR was neglected for a long time. The problem has already been solved in a way similar to the way proposed in your PR. |
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.
Argparse.parse_args exits on unrecognized option with exit_on_error=False
There was an error while loading. Please reload this page.