From 74ad43dffd9aba2ff17a6e7e2948681745a5a4bf Mon Sep 17 00:00:00 2001 From: Todd Leonhardt Date: Sat, 20 Jan 2018 13:30:19 -0500 Subject: Just improved a few comments in the subcommands.py example --- examples/subcommands.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/subcommands.py') diff --git a/examples/subcommands.py b/examples/subcommands.py index 347cb61d..7cab74dd 100755 --- a/examples/subcommands.py +++ b/examples/subcommands.py @@ -27,17 +27,17 @@ class SubcommandsExample(cmd2.Cmd): """bar sucommand of base command""" print('((%s))' % args.z) - # create the top-level parser + # create the top-level parser for the base command base_parser = argparse.ArgumentParser(prog='base') base_subparsers = base_parser.add_subparsers(title='subcommands', help='subcommand help') - # create the parser for the "foo" command + # create the parser for the "foo" sub-command parser_foo = base_subparsers.add_parser('foo', help='foo help') parser_foo.add_argument('-x', type=int, default=1, help='integer') parser_foo.add_argument('y', type=float, help='float') parser_foo.set_defaults(func=foo) - # create the parser for the "bar" command + # create the parser for the "bar" sub-command parser_bar = base_subparsers.add_parser('bar', help='bar help') parser_bar.add_argument('z', help='string') parser_bar.set_defaults(func=bar) -- cgit v1.2.1