8000 argparse docs: Positional * argument in mutually exclusive group requires a default parameter · Issue #70423 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

argparse docs: Positional * argument in mutually exclusive group requires a default parameter #70423

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
paulj3 mannequin opened this issue Jan 29, 2016 · 2 comments
Closed
Labels
docs Documentation in the Doc dir

Comments

@paulj3
Copy link
Mannequin
paulj3 mannequin commented Jan 29, 2016
BPO 26235

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 = None
created_at = <Date 2016-01-29.00:16:38.018>
labels = ['docs']
title = 'argparse docs: Positional * argument in mutually exclusive group requires a default parameter'
updated_at = <Date 2016-01-30.02:42:42.063>
user = 'https://bugs.python.org/paulj3'

bugs.python.org fields:

activity = <Date 2016-01-30.02:42:42.063>
actor = 'terry.reedy'
assignee = 'docs@python'
closed = False
closed_date = None
closer = None
components = ['Documentation']
creation = <Date 2016-01-29.00:16:38.018>
creator = 'paul.j3'
dependencies = []
files = []
hgrepos = []
issue_num = 26235
keywords = []
message_count = 1.0
messages = ['259179']
nosy_count = 3.0
nosy_names = ['bethard', 'docs@python', 'paul.j3']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = None
url = 'https://bugs.python.org/issue26235'
versions = ['Python 3.6']

@paulj3
Copy link
Mannequin Author
paulj3 mannequin commented Jan 29, 2016

The documentation for Mutual exclusion

https://docs.python.org/3/library/argparse.html#mutual-exclusion

needs a note that a mutually exclusive group may contain one positional argument. But that argument must be either nargs='?', or nargs='*'. If '*' it must also have a default parameter (other than None).

(this issue came up recently on stackoverflow. It may have also been raised in the past as a bug/issue, but I don't have time at moment to search. I had to search through several layers of code to remember all the details.)

http://stackoverflow.com/questions/35044288/how-can-i-create-an-argparse-mutually-exclusive-group-with-multiple-positional-p

@paulj3 paulj3 mannequin assigned docspython Jan 29, 2016
@paulj3 paulj3 mannequin added the docs Documentation in the Doc dir label Jan 29, 2016
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
@erlend-aasland erlend-aasland moved this to Doc issues in Argparse issues May 19, 2022
@serhiy-storchaka
Copy link
Member

It was changed in #124306.

@serhiy-storchaka serhiy-storchaka closed this as not planned Won't fix, can't repro, duplicate, stale Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
Status: Doc issues
Development

No branches or pull requests

1 participant
0