Parameters: |
- name – Syntactic sugar for names=[<name>]. Giving both name and
names is invalid.
- names – List of valid identifiers for this argument. For example, a “help”
argument may be defined with a name list of ['-h', '--help'].
- kind – Type factory & parser hint. E.g. int will turn the default text
value parsed, into a Python integer; and bool will tell the
parser not to expect an actual value but to treat the argument as a
toggle/flag.
- default – Default value made available to the parser if no value is given on the
command line.
- help – Help text, intended for use with --help.
- positional – Whether or not this argument’s value may be given positionally. When
False (default) arguments must be explicitly named.
- optional – Whether or not this (non-bool) argument requires a value.
- attr_name – A Python identifier/attribute friendly name, typically filled in with
the underscored version when name/names contain dashes.
|