Message 385727 - Python tracker

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Content
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.  

The basic logic of argparse is to accept optionals in any order, and positionals in strict positional order.  'nargs' allows us to pair any number of strings with each optional's flag.

While custom Action classes can implement interactions between arguments based on values in the namespace, it is usually easier to do this after parsing.  

But back to your core change, I wonder if adding a new nargs, such as '**' would be better than than the new parameter 'greedy_star=True'.  I prefer not to add parameters that are hard to document.  At this point in the argparse development, changes should be minimally invasive.