summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2020-08-25 11:42:40 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2020-08-25 11:42:40 -0400
commit97c348c599d8fa963553593e5c19fb100b85e313 (patch)
tree75ba5f71b6ad014c3e4e4005e36fd3a99c034686 /docs
parentae7e67c20217baaa17e6d182a3fd33b9e8c982e8 (diff)
downloadcmd2-git-97c348c599d8fa963553593e5c19fb100b85e313.tar.gz
Updated change log and docs for release1.3.5
Diffstat (limited to 'docs')
-rw-r--r--docs/features/argument_processing.rst15
1 files changed, 15 insertions, 0 deletions
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