diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2020-08-25 01:46:04 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2020-08-25 10:10:14 -0400 |
commit | 9b5a98825a9b00807a40494e8c634c392077ccd2 (patch) | |
tree | b8cfbaca2ec4622a981d96c33c7a964ca621108e /docs | |
parent | a540cfc5373cee2272de6c81be8b6fa8a78c6462 (diff) | |
download | cmd2-git-9b5a98825a9b00807a40494e8c634c392077ccd2.tar.gz |
Fixed RecursionError when printing an argparse.Namespace caused by custom attribute cmd2 was adding
Added get_statement() function to argparse.Namespace which returns __statement__ attribute
Diffstat (limited to 'docs')
-rw-r--r-- | docs/features/argument_processing.rst | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/features/argument_processing.rst b/docs/features/argument_processing.rst index 9e65742e..16170239 100644 --- a/docs/features/argument_processing.rst +++ b/docs/features/argument_processing.rst @@ -14,7 +14,8 @@ handles the following for you: 3. Passes the resulting ``argparse.Namespace`` object to your command function. The ``Namespace`` includes the ``Statement`` object that was created when parsing the command line. It is stored in the ``__statement__`` attribute of - the ``Namespace``. + the ``Namespace`` and can also be retrieved by calling ``get_statement()`` + on the ``Namespace``. 4. Adds the usage message from the argument parser to your command. |