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.

Author paul.j3
Recipients docs@python, paul.j3
Date 2016-01-29.00:16:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1454026598.04.0.15054739834.issue26235@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2016-01-29 00:16:38paul.j3setrecipients: + paul.j3, docs@python
2016-01-29 00:16:38paul.j3setmessageid: <1454026598.04.0.15054739834.issue26235@psf.upfronthosting.co.za>
2016-01-29 00:16:37paul.j3linkissue26235 messages
2016-01-29 00:16:37paul.j3create