File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 1- ## 1.3.5 (TBD )
1+ ## 1.3.5 (August 25, 2020 )
22* Bug Fixes
33 * Fixed ` RecursionError ` when printing an ` argparse.Namespace ` caused by custom attribute cmd2 was adding
44* Enhancements
Original file line number Diff line number Diff line change @@ -383,3 +383,18 @@ fashion.
383383
384384.. _decorator_primer : https://realpython.com/primer-on-python-decorators
385385.. _help_categories : https://github.com/python-cmd2/cmd2/blob/master/examples/help_categories.py
386+
387+
388+ Reserved Argument Names
389+ -----------------------
390+ ``cmd2 `` argparse decorators add the following attributes to argparse
391+ Namespaces. To avoid naming collisions, do not use any of the names for your
392+ argparse arguments.
393+
394+ - ``__statement__ `` - ``cmd2.Statement `` object that was created when parsing
395+ the command line.
396+ - ``get_statement() `` - convenience function which returns the ``Statement ``
397+ - ``__subcmd_handler__ `` - points to subcommand handler function. This is added
398+ when using the ``@cmd2.as_subcommand_to `` decorator.
399+ - ``get_handler() `` - convenience function which returns the subcommand handler
400+ or ``None `` if one was not set
You can’t perform that action at this time.
0 commit comments