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.

Author paul.j3
Recipients Christophe.Guillon, Clint Olsen, abacabadabacaba, amcnabb, andersk, bethard, cben, danielsh, davidben, drm, eric.araujo, eric.smith, gdb, gfxmonk, martin.panter, memeplex, nelhage, paul.j3, r.david.murray, skilletaudio, spaceone
Date 2016-09-15.02:30:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Clint, 'nargs=argparser.REMAINDER' ('...') may do what you want

    p.add_argument('--subscipt_args', nargs='...')

    p.parse_args('--subscipt_args --foo --bar --baz -- other args'.split())


    Namespace(pos=['other', 'args'], subscipt_args=['--foo', '--bar', '--baz'])

'REMAINDER' is like '*' except it takes everything.  But the '--' means 'everything that follows is a positional argument, so it effectively ends the 'REMAINDER'.  'REMAINDER' is documented (briefly), but I don't recall reading about its interaction with '--'.  I'm a little surprised that it wasn't mentioned earlier in this bug/issue.

'+...', argparse.PARSER is similar except it requires at least one argument.  It is used by the 'subparsers' argument, to collect the cmd string and use all that follow as subparser arguments.

There is a bug issue (or two) about what should happen when there are more than one '--' argument.
Date User Action Args
2016-09-15 02:30:30paul.j3setrecipients: + paul.j3, cben, amcnabb, bethard, eric.smith, eric.araujo, r.david.murray, memeplex, gfxmonk, andersk, abacabadabacaba, gdb, nelhage, drm, davidben, martin.panter, skilletaudio, Christophe.Guillon, danielsh, spaceone, Clint Olsen
2016-09-15 02:30:30paul.j3setmessageid: <>
2016-09-15 02:30:30paul.j3linkissue9334 messages
2016-09-15 02:30:30paul.j3create