Fix errors found by "make suspicious".

This commit is contained in:
Georg Brandl 2010-10-06 10:26:05 +00:00
parent fa4f7f97b8
commit 682d7e0e07
14 changed files with 30 additions and 28 deletions

View file

@ -737,14 +737,14 @@ values are:
* N (an integer). N args from the command-line will be gathered together into a
list. For example::
>>> parser = argparse.ArgumentParser()
>>> parser.add_argument('--foo', nargs=2)
>>> parser.add_argument('bar', nargs=1)
>>> parser.parse_args('c --foo a b'.split())
Namespace(bar=['c'], foo=['a', 'b'])
>>> parser = argparse.ArgumentParser()
>>> parser.add_argument('--foo', nargs=2)
>>> parser.add_argument('bar', nargs=1)
>>> parser.parse_args('c --foo a b'.split())
Namespace(bar=['c'], foo=['a', 'b'])
Note that ``nargs=1`` produces a list of one item. This is different from
the default, in which the item is produced by itself.
Note that ``nargs=1`` produces a list of one item. This is different from
the default, in which the item is produced by itself.
* ``'?'``. One arg will be consumed from the command-line if possible, and
produced as a single item. If no command-line arg is present, the value from