(original) (raw)
changeset: 69519:79f3ae389dae branch: 2.7 parent: 69516:e8464256b4d7 user: Ezio Melotti ezio.melotti@gmail.com date: Thu Apr 21 23:06:48 2011 +0300 files: Doc/library/argparse.rst description: #11904: fix indentation in argparse doc. Noticed by Vladimir Rutsky. diff -r e8464256b4d7 -r 79f3ae389dae Doc/library/argparse.rst --- a/Doc/library/argparse.rst Thu Apr 21 22:56:51 2011 +0300 +++ b/Doc/library/argparse.rst Thu Apr 21 23:06:48 2011 +0300 @@ -647,7 +647,7 @@ 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') @@ -655,9 +655,9 @@ 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) /ezio.melotti@gmail.com