Chris Jerdonek added the comment: Was argparse ever supposed to support inputs of the form given in the example (i.e. different positional arguments straddling optional arguments): 'yy -x zz'?
The usage string shows up as: "usage: test.py [-h] [-x] y [z [z ...]]" The original example seems to work with the current code if given as: '-x yy zz'. Also, substituting argparse.REMAINDER for '*' in the original example gives the following both with and without the patch: Namespace(x=False, y='yy', z=['-x', 'zz']) That doesn't seem consistent with straddling being supported. Lastly, passing just '-x' gives the following error with and without the patch (z should be optional): error: the following arguments are required: y, z ---------- nosy: +chris.jerdonek _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15112> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com