when users give the program invalid arguments.
+Summary
+-------
+
+Core Functionality
+^^^^^^^^^^^^^^^^^^
+
+The :mod:`argparse` module's support for command-line interfaces is built
+from the following:
+
+The :class:`argparse.ArgumentParser` creates a new :class:`ArgumentParser`
+object. Commonly used arguments include prog_, description_, and
+formatter_class_. For example, the user can create an instance of
+:class:`ArgumentParser` through the following::
+
+ >>> parser = argparse.ArgumentParser(prog='PROG', description='DESC',
+ ... formatter_class=argparse.RawDescriptionHelpFormatter)
+
+The :func:`ArgumentParser.add_argument` is a function that is used
+to define how a single command-line argument should be parsed. Commonly used
+arguments include `name or flags`_, action_, default_, type_, required_,
+and help_. An example of the function :func:`ArgumentParser.add_argument`
+is as follows::
+
+ >>> parser.add_argument('-v', '--verbose', action='store_true',
+ ... help='Show various debugging information')
+
+
+Basic Usage of :func:`add_argument`
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+
+**Name or Flags Type**
+
+====================== ===========================
+Type Example
+====================== ===========================
+Positional ``'foo'``
+Optional ``'-v'``, ``'--verbose'``
+====================== ===========================
+
+
+**Basic Arguments:**
+
+====================== =========================================================== =========================================================================================================================
+Name Description Keywords
+====================== =========================================================== =========================================================================================================================
+action_ Specifies how an argument should be handled ``'store'``, ``'store_const'``, ``'store_true'``, ``'append'``, ``'append_const'``, ``'count'``, ``'help'``, ``'version'``
+default_ Default value used when an argument is not provided
+type_ Automatically converts an argument to the given type :class:`int`, :class:`float`, :class:`bool`, ``argparse.FileType('w')``, ``callable function``
+help_ Help message of an argument
+====================== =========================================================== =========================================================================================================================
+
+
+
+**Advanced Arguments:**
+
+====================== =========================================================== =======================================================================================================================
+Name Description Keywords
+====================== =========================================================== =======================================================================================================================
+nargs_ Associates a single action with the number of arguments ``N`` (:class:`int`), ``'?'``, ``'*'``, ``'+'``, ``argparse.REMAINDER``
+const_ Stores constant values of names or flags
+choices_ A container that lists the possible values ``['foo', 'bar']``, ``range(1, 10)``, Any object that supports ``in`` operator
+required_ Indicates if an optional argument is required or not ``True``, ``False``
+metavar_ An alternative display name for the argument
+dest_ Specifies name of attribute to be used in ``parse_args()``
+====================== =========================================================== =======================================================================================================================
+
+
+
Example
-------
The following sections describe how each of these are used.
+.. _prog:
+
prog
^^^^
your usage messages.
+.. _description:
+
description
^^^^^^^^^^^
not be reflected in the child.
+.. _formatter_class:
+
formatter_class
^^^^^^^^^^^^^^^
The following sections describe how each of these are used.
+.. _name_or_flags:
+
name or flags
^^^^^^^^^^^^^
PROG: error: the following arguments are required: bar
+.. _action:
+
action
^^^^^^
For more details, see :class:`Action`.
+
+.. _nargs:
+
nargs
^^^^^
will be consumed and a single item (not a list) will be produced.
+.. _const:
+
const
^^^^^
``const=None`` by default, including when ``action='append_const'`` or
``action='store_const'``.
+.. _default:
+
default
^^^^^^^
Namespace(foo='1')
+.. _type:
+
type
^^^^
using the choices_ keyword instead.
+.. _choices:
+
choices
^^^^^^^
many choices), just specify an explicit metavar_.
+.. _required:
+
required
^^^^^^^^
*options* to be *optional*, and thus they should be avoided when possible.
+.. _help:
+
help
^^^^
-h, --help show this help message and exit
+.. _metavar:
+
metavar
^^^^^^^
--foo bar baz
+.. _dest:
+
dest
^^^^