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 martin.panter
Recipients bethard, chris.jerdonek, gfxmonk, martin.panter, tshepang, waltermundt
Date 2013-08-24.07:05:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1377327905.12.0.130613315757.issue15112@psf.upfronthosting.co.za>
In-reply-to
Content
I was surprised to discover that “option straddling” doesn’t work this way with nargs="*". It seems to work fine with most other kinds of positional arguments I have tried, and I imagine that this was by design rather than accident. Many Gnu CLI programs also tend to support it as well (e.g. “cp file1 file2 --verbose dir/”).

I assumed nargs=argparse.REMAINDER was intended to override the “option straddling”. Otherwise, by just going off the documentation it sounds like nargs=argparse.REMAINDER is much the same as nargs="*".
History
Date User Action Args
2013-08-24 07:05:05martin.pantersetrecipients: + martin.panter, bethard, gfxmonk, chris.jerdonek, tshepang, waltermundt
2013-08-24 07:05:05martin.pantersetmessageid: <1377327905.12.0.130613315757.issue15112@psf.upfronthosting.co.za>
2013-08-24 07:05:05martin.panterlinkissue15112 messages
2013-08-24 07:05:04martin.pantercreate