Skip to content

Document argparse.REMAINDER as being equal to "..." #68835

Description

@anntzer
mannequin
BPO 24647
Nosy @bitdancer, @anntzer

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 = None
closed_at = <Date 2016-05-30.01:07:55.427>
created_at = <Date 2015-07-16.20:47:25.084>
labels = ['docs']
title = 'Document argparse.REMAINDER as being equal to "..."'
updated_at = <Date 2016-05-30.01:07:55.425>
user = 'https://github.com/anntzer'

bugs.python.org fields:

activity = <Date 2016-05-30.01:07:55.425>
actor = 'r.david.murray'
assignee = 'docs@python'
closed = True
closed_date = <Date 2016-05-30.01:07:55.427>
closer = 'r.david.murray'
components = ['Documentation']
creation = <Date 2015-07-16.20:47:25.084>
creator = 'Antony.Lee'
dependencies = []
files = []
hgrepos = []
issue_num = 24647
keywords = []
message_count = 3.0
messages = ['246824', '247942', '266656']
nosy_count = 5.0
nosy_names = ['bethard', 'r.david.murray', 'docs@python', 'paul.j3', 'Antony.Lee']
pr_nums = []
priority = 'normal'
resolution = 'rejected'
stage = 'resolved'
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue24647'
versions = ['Python 2.7', 'Python 3.5', 'Python 3.6']

Activity

  1. anntzer commented on Jul 16, 2015

    anntzermannequin
    MannequinAuthor

    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.

  2. added
    stdlibStandard Library Python modules in the Lib/ directory
    on Jul 16, 2015
  3. added
    docsDocumentation in the Doc dir
    and removed
    stdlibStandard Library Python modules in the Lib/ directory
    on Jul 25, 2015
  4. paulj3 commented on Aug 3, 2015

    paulj3mannequin
    Mannequin

    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.

  5. bitdancer commented on May 30, 2016

    @bitdancer
    Member

    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.

  6. transferred this issue fromon Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions