Message 276486 - 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'm not sure if this is applicable to this bug, but one feature missing from argparse is the ability to snarf arbitrary options up to a terminating '--'. The purpose of this is to collect arguments for potential children you may spawn. An example:

--subscript_args --foo --bar --baz -- <other args>

So, if you ran args = parser.parse_args()

args.subscript_args = [ '--foo', '--bar', '--baz' ]

Right now I have NO way of enabling this w/o writing my own argument parser, and I think it's bizarre that argparse can't do something like this.

And no, I don't want to pass a singly-quoted string to this so I don't have to manually split() the arguments which may or may not match what /bin/sh does.

Does this deserve it's own enhancement request?