Skip to content
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

Feature request: allow double parsing #71

Open
jakkes opened this issue Jan 31, 2022 · 1 comment
Open

Feature request: allow double parsing #71

jakkes opened this issue Jan 31, 2022 · 1 comment
Labels
wontfix This will not be worked on

Comments

@jakkes
Copy link

jakkes commented Jan 31, 2022

I've got a use-case where I need to parse args repeatedly. For now, I am simply doing

parser._parsed = False

But an official flag in __init__ would be appreciated.

@martinjm97
Copy link
Collaborator

Hi @jakkes,

Consistent with the behavior of argparse, we don't allow repeated parsing. In our case, we don't expect parsing to be idempotent (for example, you might increment a variable in process_args and be surprised to see it get incremented twice). As a result, we think that the ugliness of changing an underscored attribute might be warranted. If you have additional reasoning for why this should be an official flag, we're happy to hear it.

Best,
Kyle and Jesse

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants