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.
Created on 2012年07月22日 22:12 by bethard, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| remainder.patch | paul.j3, 2013年04月03日 06:44 | review | ||
| remainder.patch | paul.j3, 2013年04月03日 07:18 | review | ||
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 3292 | merged | r.david.murray, 2017年09月04日 19:14 | |
| PR 3328 | merged | r.david.murray, 2017年09月04日 23:21 | |
| PR 3325 | merged | r.david.murray, 2017年09月04日 23:22 | |
| Messages (7) | |||
|---|---|---|---|
| msg166174 - (view) | Author: Steven Bethard (bethard) * (Python committer) | Date: 2012年07月22日 22:12 | |
From http://bugs.python.org/issue14191#msg155202: ArgumentParser.parse_args(args=None, namespace=None) ... However, nowhere is the args= parameter explained. One example is given at the end of 15.4.4.6 showing the use of args= which apparently accepts a list of parameters, similar to the positional list of parameters that are used in all the other examples. It might be nice to clarify that. |
|||
| msg185888 - (view) | Author: paul j3 (paul.j3) * (Python triager) | Date: 2013年04月03日 04:47 | |
The 'args=' parameter is the same as the first positional parameter used in most of the examples. That is normal Python behavior. 15.4.4.5. Beyond sys.argv explains this alternative way of specifying argv. Still 2 bullet points could be added to 15.4.4. - args - A list of strings, default is sys.argv[1:] (link to 15.4.4.5.) - namespace - A Namespace object, default is a new Namespace (link to 15.4.4.6.) Maybe a 15.4.4.5. example using args=['1', '2', '3', '4'] would also be helpful. |
|||
| msg185893 - (view) | Author: paul j3 (paul.j3) * (Python triager) | Date: 2013年04月03日 06:44 | |
This patch to argparse.rst adds the argument points to parse_args(). It also adds two points to the 'Upgrading optparse code' section, one about using 'nargs=argparse.REMAINDER', and other about 'parse_known_args()'. I'm not entirely happy with the format of the internal hyperlinks. |
|||
| msg185895 - (view) | Author: paul j3 (paul.j3) * (Python triager) | Date: 2013年04月03日 07:18 | |
I changed the reference to the optparse allow_interspersed_args attribute to the disable_interspersed_args() method. |
|||
| msg187330 - (view) | Author: Glenn Linderman (v+python) * | Date: 2013年04月19日 01:50 | |
These docs changes seem reasonable, from a side-by-side view (I didn't attempt to look at the formatted results of applying the patch), to better document the current behavior. |
|||
| msg301243 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2017年09月04日 19:17 | |
I've turned this into a PR. The example was already changed in a previous checkin. I reworded the optparse porting addition to match the existing style of the list. |
|||
| msg301800 - (view) | Author: Mariatta (Mariatta) * (Python committer) | Date: 2017年09月10日 05:57 | |
Thanks, David. I merged the backport PRs. Closing this. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:33 | admin | set | github: 59632 |
| 2017年09月10日 05:57:04 | Mariatta | set | status: open -> closed nosy: + Mariatta messages: + msg301800 resolution: fixed stage: resolved |
| 2017年09月04日 23:22:41 | r.david.murray | set | pull_requests: + pull_request3350 |
| 2017年09月04日 23:21:46 | r.david.murray | set | pull_requests: + pull_request3348 |
| 2017年09月04日 19:18:05 | r.david.murray | set | versions: + Python 3.6, Python 3.7, - Python 3.2, Python 3.3, Python 3.4 |
| 2017年09月04日 19:17:36 | r.david.murray | set | nosy:
+ r.david.murray messages: + msg301243 |
| 2017年09月04日 19:14:33 | r.david.murray | set | pull_requests: + pull_request3327 |
| 2013年04月19日 01:50:35 | v+python | set | nosy:
+ v+python messages: + msg187330 |
| 2013年04月03日 07:18:43 | paul.j3 | set | files:
+ remainder.patch messages: + msg185895 |
| 2013年04月03日 06:44:01 | paul.j3 | set | files:
+ remainder.patch keywords: + patch messages: + msg185893 |
| 2013年04月03日 04:47:45 | paul.j3 | set | nosy:
+ paul.j3 messages: + msg185888 |
| 2012年07月22日 22:12:33 | bethard | create | |