Message196066
| 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="*". |
|