diff options
author | steven.bethard <devnull@localhost> | 2009-07-13 01:07:49 +0000 |
---|---|---|
committer | steven.bethard <devnull@localhost> | 2009-07-13 01:07:49 +0000 |
commit | dbc0313b95822ccb353396ccdedfa49b45454763 (patch) | |
tree | 06deb575a78a827a9a5965568f82521e80aadcb6 | |
parent | dfb0e513927c55c44eb4dc76490b0748dfe078d7 (diff) | |
download | argparse-dbc0313b95822ccb353396ccdedfa49b45454763.tar.gz |
Fix minor ReST bugs.
-rw-r--r-- | doc/source/ArgumentParser.rst | 2 | ||||
-rw-r--r-- | doc/source/add_argument.rst | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/doc/source/ArgumentParser.rst b/doc/source/ArgumentParser.rst index 8a103dd..d615acd 100644 --- a/doc/source/ArgumentParser.rst +++ b/doc/source/ArgumentParser.rst @@ -143,7 +143,7 @@ The ``fromfile_prefix_chars=`` argument defaults to ``None``, meaning that argum argument_default ---------------- -Generally, argument defaults are specified either by passing a default_ to :meth:`add_argument` or by calling the :meth:`set_defaults` methods with a specific set of name-value pairs. Sometimes however, it may be useful to specify a single parser-wide default for arguments. This can be accomplished by passing the ``argument_default=`` keyword argument to ArgumentParser. For example, to globally suppress attribute creation on :meth:`parse_args` calls, we supply ``argument_default=SUPPRESS``:: +Generally, argument defaults are specified either by passing a default to :meth:`add_argument` or by calling the :meth:`set_defaults` methods with a specific set of name-value pairs. Sometimes however, it may be useful to specify a single parser-wide default for arguments. This can be accomplished by passing the ``argument_default=`` keyword argument to ArgumentParser. For example, to globally suppress attribute creation on :meth:`parse_args` calls, we supply ``argument_default=SUPPRESS``:: >>> parser = argparse.ArgumentParser(argument_default=argparse.SUPPRESS) >>> parser.add_argument('--foo') diff --git a/doc/source/add_argument.rst b/doc/source/add_argument.rst index 43e1b29..8d6b35c 100644 --- a/doc/source/add_argument.rst +++ b/doc/source/add_argument.rst @@ -22,7 +22,7 @@ The add_argument() method name or flags
-------------
-The :meth:`add_argument` method needs to know whether you're expecting an optional argument, e.g. ``-f`` or ``--foo`, or a positional argument, e.g. a list of filenames. The first arguments passed to :meth:`add_argument` must therefore be either a series of flags, or a simple argument name. For example, an optional argument could be created like::
+The :meth:`add_argument` method needs to know whether you're expecting an optional argument, e.g. ``-f`` or ``--foo``, or a positional argument, e.g. a list of filenames. The first arguments passed to :meth:`add_argument` must therefore be either a series of flags, or a simple argument name. For example, an optional argument could be created like::
>>> parser.add_argument('-f', '--foo')
|