cpython: 8568762381b4 (original) (raw)
Mercurial > cpython
changeset 69523:8568762381b4
#11904-#11905: Merge typo fixes with 3.2. [#11904]
Ezio Melotti ezio.melotti@gmail.com | |
---|---|
date | Thu, 21 Apr 2011 23:12:53 +0300 |
parents | 56825d54dc84(current diff)15f482996880(diff) |
children | 3fd70900a9a7 |
files | Doc/library/argparse.rst |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-)[+] [-] Doc/library/argparse.rst 10 |
line wrap: on
line diff
--- a/Doc/library/argparse.rst
+++ b/Doc/library/argparse.rst
@@ -598,7 +598,7 @@ The add_argument() method
has its own more detailed description below, but in short they are:
* name or flags
_ - Either a name or a list of option strings, e.g. foo
or ``-f, --foo``[](#l1.7)
or ``-f, --foo``.[](#l1.8)
* action_ - The basic type of action to be taken when this argument is encountered at the command line. @@ -667,7 +667,7 @@ them, though most actions simply add an command-line args should be handled. The supported actions are:
- action. For example::
parser = argparse.ArgumentParser() parser.add_argument('--foo') @@ -675,9 +675,9 @@ command-line args should be handled. The Namespace(foo='1')
- argument. (Note that the const_ keyword argument defaults to the rather
- unhelpful
None
.) The'store_const'
action is most commonly used with - optional arguments that specify some sort of flag. For example::
- argument. (Note that the const_ keyword argument defaults to the rather
- unhelpful
None
.) The'store_const'
action is most commonly used with - optional arguments that specify some sort of flag. For example::
parser = argparse.ArgumentParser() parser.add_argument('--foo', action='store_const', const=42)