You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Document argparse.REMAINDER as being equal to "..." #68835
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2016-05-30.01:07:55.427>created_at=<Date2015-07-16.20:47:25.084>labels= ['docs']
title='Document argparse.REMAINDER as being equal to "..."'updated_at=<Date2016-05-30.01:07:55.425>user='https://github.com/anntzer'
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.
'? * +' 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.
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.
Activity
anntzer commentedon Jul 16, 2015
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.
paulj3 commentedon Aug 3, 2015
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.
bitdancer commentedon May 30, 2016
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.