Skip to content

Commit 97c348c

Browse files
committed
Updated change log and docs for release
1 parent ae7e67c commit 97c348c

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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

docs/features/argument_processing.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)