diff --git a/CHANGELOG.md b/CHANGELOG.md index f2ba27108..e57c1e4b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 1.3.5 (TBD) +## 1.3.5 (August 25, 2020) * Bug Fixes * Fixed `RecursionError` when printing an `argparse.Namespace` caused by custom attribute cmd2 was adding * Enhancements diff --git a/docs/features/argument_processing.rst b/docs/features/argument_processing.rst index 161702395..7ce8c815c 100644 --- a/docs/features/argument_processing.rst +++ b/docs/features/argument_processing.rst @@ -383,3 +383,18 @@ fashion. .. _decorator_primer: https://realpython.com/primer-on-python-decorators .. _help_categories: https://github.com/python-cmd2/cmd2/blob/master/examples/help_categories.py + + +Reserved Argument Names +----------------------- +``cmd2`` argparse decorators add the following attributes to argparse +Namespaces. To avoid naming collisions, do not use any of the names for your +argparse arguments. + +- ``__statement__`` - ``cmd2.Statement`` object that was created when parsing + the command line. +- ``get_statement()`` - convenience function which returns the ``Statement`` +- ``__subcmd_handler__`` - points to subcommand handler function. This is added + when using the ``@cmd2.as_subcommand_to`` decorator. +- ``get_handler()`` - convenience function which returns the subcommand handler + or ``None`` if one was not set