Issue 24647: Document argparse.REMAINDER as being equal to "..." (original) (raw)

Issue24647

Created on 2015-07-16 20:47 by Antony.Lee, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (3)
msg246824 - (view) Author: Antony Lee (Antony.Lee) * Date: 2015-07-16 20:47
Currently the argparse docs mention the special values "+", "*" and "?" by their actual values instead of argparse.{ONE_OR_MORE,ZERO_OR_MORE,OPTIONAL}, but argparse.REMAINDER is mentioned as is. It seems easier to just use its actual value ("...") in the docs as well.
msg247942 - (view) Author: paul j3 (paul.j3) * (Python triager) Date: 2015-08-03 17:31
Also, argparse.PARSER is '+...' '? * +' have closely matched analogs in regex patterns. '...' and '+...' do not. So Python users will have an intuitive idea of what "nargs='*'" means. "nargs='...'" is not so obvious. As a general rule, the document does not expose the values of module constants.
msg266656 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2016-05-30 01:07
I would say nargs='...' is borderline...it's meaning is *fairly* intuitive, but unlike the other three it does not, as paul.j3 points out, have a regex (or shell) counterpart. I think we should respect the original author's decision in this case and leave well enough alone.
History
Date User Action Args
2022-04-11 14:58:18 admin set github: 68835
2016-05-30 01:07:55 r.david.murray set status: open -> closednosy: + r.david.murraymessages: + resolution: rejectedstage: resolved
2015-08-03 17:31:42 paul.j3 set nosy: + paul.j3messages: +
2015-07-25 03:47:52 ned.deily set nosy: + docs@python, bethardassignee: docs@pythoncomponents: + Documentation, - Library (Lib)versions: + Python 2.7, Python 3.6
2015-07-16 20:47:25 Antony.Lee create