Message178481
| Author |
chris.jerdonek |
| Recipients |
bethard, chris.jerdonek, gfxmonk, tshepang, waltermundt |
| Date |
2012年12月29日.08:50:41 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1356771041.26.0.720974725499.issue15112@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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 |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年12月29日 08:50:41 | chris.jerdonek | set | recipients:
+ chris.jerdonek, bethard, gfxmonk, tshepang, waltermundt |
| 2012年12月29日 08:50:41 | chris.jerdonek | set | messageid: <1356771041.26.0.720974725499.issue15112@psf.upfronthosting.co.za> |
| 2012年12月29日 08:50:41 | chris.jerdonek | link | issue15112 messages |
| 2012年12月29日 08:50:41 | chris.jerdonek | create |
|