typed-argument-parser
typed-argument-parser copied to clipboard
Feature request: allow double parsing
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.
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