Required keyword arguments are mislabelled "optional"
Bug #1948345 reported by
Nate Johnston
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cliff |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Running the --help option for an OpenStack Client command outputs help content that contains several argument headings of which one is "Optional Arguments."
While this heading might be accurate in one context ("these are arguments that require an option prefix"), it is misleading to many who interpret it as, "arguments that are not required."
The suggestion is to change "Optional Arguments" to "Keyword Arguments." Thanks for your consideration.
To post a comment you must log in.
I believe the governing document for how this should be specified is IEEE Standard 1003.1,
a.k.a. POSIX [1].
That standard defines two attributes for command line arguments. An argument
can be mandatory or optional, which is pretty straightforward. An argument also
can either be a keyword argument - which is denoted by starting with one or more
dashes followed by one or more alphanumeric characters - or it can be a
positional argument (also known as an operand) whose meaning is indicated by
it's position relative to the other positional arguments. Conflating the
mandatory/optional aspect and the keyword/operand aspect will definitely induce
confusion.
I understand that the cliff behavior is transparently representing the way argparse but-required
processes options but I think we have the opportunity to check the required field in the
array of optional arguments, and create a new argument group for optional-
arguments.
[1] in part https:/ /pubs.opengroup .org/onlinepubs /9699919799/ basedefs/ V1_chap12. html#tag_ 12_01