From 2f1db7def9f243e7551a50232f17c03686efa618 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Thu, 21 Apr 2011 23:06:48 +0300 Subject: #11904: fix indentation in argparse doc. Noticed by Vladimir Rutsky. --- Doc/library/argparse.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst index 3cc369a..7fad88b 100644 --- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -651,7 +651,7 @@ them, though most actions simply add an attribute to the object returned by command-line args should be handled. The supported actions are: * ``'store'`` - This just stores the argument's value. This is the default - action. For example:: + action. For example:: >>> parser = argparse.ArgumentParser() >>> parser.add_argument('--foo') @@ -659,9 +659,9 @@ command-line args should be handled. The supported actions are: Namespace(foo='1') * ``'store_const'`` - This stores the value specified by the const_ keyword - 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) -- cgit v0.12 From dca309d1379f3bb64fd98bfcfbd3933729aae49e Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Thu, 21 Apr 2011 23:09:27 +0300 Subject: #11905: fix missing full stop in argparse doc. Noticed by Vladimir Rutsky. --- Doc/library/argparse.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst index 7fad88b..13348a0 100644 --- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -582,7 +582,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`` + or ``-f, --foo``. * action_ - The basic type of action to be taken when this argument is encountered at the command line. -- cgit v0.12