summaryrefslogtreecommitdiff
path: root/cmd2/utils.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2020-02-05 09:41:47 -0500
committerKevin Van Brunt <kmvanbrunt@gmail.com>2020-02-05 09:42:43 -0500
commit34f00eda97d44922896beac608a9d4a085ae6e0d (patch)
tree4de7029c68f75d4c59afdda9de25de4495c0cc6d /cmd2/utils.py
parentce7cbe22916eef1693c0a9d0b0c43297d53f9d3b (diff)
downloadcmd2-git-34f00eda97d44922896beac608a9d4a085ae6e0d.tar.gz
Updated documentation
Diffstat (limited to 'cmd2/utils.py')
-rw-r--r--cmd2/utils.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd2/utils.py b/cmd2/utils.py
index ee53e924..728c1ac3 100644
--- a/cmd2/utils.py
+++ b/cmd2/utils.py
@@ -85,8 +85,10 @@ class Settable:
Settable Initializer
:param name: name of the instance attribute being made settable
- :param val_type: type or callable used to cast the string value from the command line
- setting this to bool provides tab completion for true/false and validation using str_to_bool
+ :param val_type: callable used to cast the string value from the command line into its proper type and
+ even validate its value. Setting this to bool provides tab completion for true/false and
+ validation using str_to_bool(). The val_type function should raise an exception if it fails.
+ This exception will be caught and printed by Cmd.do_set().
:param description: string describing this setting
The following optional settings provide tab completion for a parameter's values. They correspond to the