[issue26394] Have argparse provide ability to require a fallback value be present

paul j3 report at bugs.python.org
Fri Mar 11 12:50:14 EST 2016


paul j3 added the comment:

Yes, the use of ordered dictionary would be right.  Your code would still reorder actions that have fallback values, but that wouldn't affect others.

Yes, a fallback hook at the end of parsing would have to be placed before the 'required' testing, not after as in my 'group' testing.

I still haven't absorbed why this patch is superior to the ConfigArgParse approach, or chaining dictionary values after parsing.

By the way I like how ConfigArgParse claims to automatically test itself against 'test_argparse.py'.  I'd also suggest following its example in published this enhancement in your own repository and pypi.  The process of adding features to the main Python distribution is very slow.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26394>
_______________________________________


More information about the Python-bugs-list mailing list