File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -839,10 +839,11 @@ how the command-line arguments should be handled. The supplied actions are:
839
839
>>> parser.parse_args(['--version'])
840
840
PROG 2.0
841
841
842
- Only actions that consume command-line arguments (e.g. ``'store' ``,
843
- ``'append' `` or ``'extend' ``) can be used with positional arguments. You may
844
- also specify an arbitrary action by passing an :class: `Action ` subclass or
845
- other object that implements the same interface.
842
+ You may also specify an arbitrary action by passing an :class: `Action ` subclass
843
+ (e.g. :class: `BooleanOptionalAction `) or other object that implements the same
844
+ interface. Only actions that consume command-line arguments (e.g. ``'store' ``,
845
+ ``'append' ``, ``'extend' ``, or custom actions with non-zero ``nargs ``) can be used
846
+ with positional arguments.
846
847
847
848
The recommended way to create a custom action is to extend :class: `Action `,
848
849
overriding the :meth: `!__call__ ` method and optionally the :meth: `!__init__ ` and
You can’t perform that action at this time.
0 commit comments