Message156263
| Author |
eric.smith |
| Recipients |
bethard, eric.smith, jeffknupp, kalt, r.david.murray, wt |
| Date |
2012年03月18日.18:30:43 |
| SpamBayes Score |
7.294044e-07 |
| Marked as misclassified |
No |
| Message-id |
<1332095444.57.0.405683844365.issue13922@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
No. parse_known_args assumes you have known and unknown args intermixed.
Going back to the original example, what if "hack" and ":target" had overlapping parameter names (say, they both supported "--arg1")? I think parse_known_args would pick up all instances of "--arg1". I really want "--" to mean "treat everything else as non-optional arguments".
Whether that's the original intent, I don't know. But as David says, unless it is, it's impossible to implement such a scheme with argparse. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年03月18日 18:30:44 | eric.smith | set | recipients:
+ eric.smith, bethard, kalt, r.david.murray, wt, jeffknupp |
| 2012年03月18日 18:30:44 | eric.smith | set | messageid: <1332095444.57.0.405683844365.issue13922@psf.upfronthosting.co.za> |
| 2012年03月18日 18:30:44 | eric.smith | link | issue13922 messages |
| 2012年03月18日 18:30:43 | eric.smith | create |
|