[issue9694] argparse: Default Help Message Lists Required Args As Optional

2012-03-18 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe : -- nosy: +tshepang ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue9694] argparse: Default Help Message Lists Required Args As Optional

2011-03-27 Thread Éric Araujo
Changes by Éric Araujo : -- versions: +Python 2.7, Python 3.2 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue9694] argparse: Default Help Message Lists Required Args As Optional

2011-03-27 Thread Steven Bethard
Steven Bethard added the comment: So it strikes me that there already exists an officially supported way to rename your option groups. Just only create your own option groups (never use the default ones) and only put arguments there, e.g.: - temp.py ---

[issue9694] argparse: Default Help Message Lists Required Args As Optional

2010-08-28 Thread Steven Bethard
Steven Bethard added the comment: I think this is still really a feature request. We can't just change the text from "optional" - that would silently change a large number of help messages without any warning. So to fix this "bug", we're going to have to add an API to explicitly set the group

[issue9694] argparse: Default Help Message Lists Required Args As Optional

2010-08-27 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue9694] argparse: Default Help Message Lists Required Args As Optional

2010-08-27 Thread R. David Murray
R. David Murray added the comment: *This* bug is a behavior bug (required flags are mis-labelled as being optional in the help text). The referenced bug is a feature request, but it may make sense to consider it while fixing this one. -- ___ Pytho

[issue9694] argparse: Default Help Message Lists Required Args As Optional

2010-08-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: Is this really a behavior bug or doc bug? Or a feature request for better message customization? -- nosy: +terry.reedy ___ Python tracker ___ __

[issue9694] argparse: Default Help Message Lists Required Args As Optional

2010-08-27 Thread R. David Murray
R. David Murray added the comment: Well, there's also issue 9652, which speaks to having a more general facility, I suppose. Maybe an exposed dictionary attribute containing the constant strings? -- ___ Python tracker

[issue9694] argparse: Default Help Message Lists Required Args As Optional

2010-08-27 Thread Steven Bethard
Steven Bethard added the comment: And I guess the bigger issue to think about is how to add this in a backwards compatible way. I guess we could just add methods like "set_positionals_group_name(name)" and then fiddle with "self._positionals.title" in there. Not sure that's a great solution t

[issue9694] argparse: Default Help Message Lists Required Args As Optional

2010-08-27 Thread Steven Bethard
Steven Bethard added the comment: I guess one possibility might be "flag arguments". It's not great, but I guess it's more accurate. -- ___ Python tracker ___ __

[issue9694] argparse: Default Help Message Lists Required Args As Optional

2010-08-26 Thread Eric Smith
Eric Smith added the comment: If you add a positional parameter by adding: parser.add_argument('foo') then the output becomes: $ python argparse-help-says-required-args-are-optional.py -h usage: issue9649.py [-h] --reqarg REQARG [--optarg OPTARG] foo Do something positional arguments: foo

[issue9694] argparse: Default Help Message Lists Required Args As Optional

2010-08-26 Thread Ben Schmaus
Ben Schmaus added the comment: FWIW, I like the idea of just using the label "options". -- ___ Python tracker ___ ___ Python-bugs-list

[issue9694] argparse: Default Help Message Lists Required Args As Optional

2010-08-26 Thread Eric Smith
Eric Smith added the comment: Or "parameters:"? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue9694] argparse: Default Help Message Lists Required Args As Optional

2010-08-26 Thread R. David Murray
R. David Murray added the comment: Perhaps you could just label them 'options:'? After all, even if you have several options you may be required to pick at least one :) -- ___ Python tracker _

[issue9694] argparse: Default Help Message Lists Required Args As Optional

2010-08-26 Thread Steven Bethard
Steven Bethard added the comment: Yeah, I guess the optional vs. positional isn't the best terminology now that you can have required flag-based arguments. Did you have a word other than "optional" that you'd prefer? -- ___ Python tracker

[issue9694] argparse: Default Help Message Lists Required Args As Optional

2010-08-26 Thread Eric Smith
Eric Smith added the comment: Duh. Sorry about that. Also applies to 3.2. -- versions: +Python 3.2 ___ Python tracker ___ ___ Python-

[issue9694] argparse: Default Help Message Lists Required Args As Optional

2010-08-26 Thread R. David Murray
R. David Murray added the comment: Yeah, the fact that it is listed under the heading "optional arguments:" :) Guess we need a new section? -- nosy: +r.david.murray ___ Python tracker

[issue9694] argparse: Default Help Message Lists Required Args As Optional

2010-08-26 Thread Eric Smith
Eric Smith added the comment: It looks to me like reqarg is marked as required, since it's not in brackets. Or am I missing something? -- nosy: +bethard, eric.smith ___ Python tracker _

[issue9694] argparse: Default Help Message Lists Required Args As Optional

2010-08-26 Thread Ben Schmaus
New submission from Ben Schmaus : The argparse module lists required args as optional in the default help message. If you run the following program (also attached) you'll get the output listed below. #!/usr/bin/env python import argparse parser = argparse.ArgumentParser( description = 'D