diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2020-08-25 11:42:40 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2020-08-25 11:42:40 -0400 |
commit | 97c348c599d8fa963553593e5c19fb100b85e313 (patch) | |
tree | 75ba5f71b6ad014c3e4e4005e36fd3a99c034686 | |
parent | ae7e67c20217baaa17e6d182a3fd33b9e8c982e8 (diff) | |
download | cmd2-git-97c348c599d8fa963553593e5c19fb100b85e313.tar.gz |
Updated change log and docs for release1.3.5
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | docs/features/argument_processing.rst | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index f2ba2710..e57c1e4b 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 16170239..7ce8c815 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 |