Glenn Linderman <v+pyt...@g.nevcal.com> added the comment:

Paul said:
I haven't had a chance to study your longer posts, but it seems to me that the 
AddFruitAction example could just as well be implemented with 

    parser.add_argument('--color', nargs='*', action='append')

with post parsing processing to create the 'fruits' dicts from the appended 
lists.  


That was also my first reaction, Paul, when I read Tadek's proposal. But I 
quickly realized that particularly with the feature of "capture and reset to 
default" that the number of instances of a particular optional and the number 
of positionals do not always match, and there is no way to correlate them 
later, even if they are all captured and saved.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42973>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to