[docs] [issue9694] argparse required arguments displayed under "optional arguments"

paul j3 report at bugs.python.org
Wed Mar 23 23:03:26 EDT 2016


paul j3 added the comment:

I can see changing the group title from 'optional arguments' to 'options' or 'optionals'

    parser._optionals.title
    'optional arguments'

But I don't think there's a need to change references in the code or its comments from 'optionals' to 'options'.  I like the parallelism between 'optionals' and 'positionals'.  The terms are well defined in the code.  During parsing, the 'required' attribute is only used at the end to check for missing arguments.

In Stackoverflow questions I'm tended to talk about 'flagged arguments'.

I still favor encouraging users to define their argument group(s), and making it easier to modify the titles of the two predefined groups.  I don't see enough of a consensus on alternative titles to make more sweeping changes.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9694>
_______________________________________


More information about the docs mailing list