Commit 9375492b authored by Georg Brandl's avatar Georg Brandl

#9112: document error() and exit() methods of ArgumentParser.

parent 0036bcf8
......@@ -1663,7 +1663,6 @@ printing it:
information about the arguments registered with the :class:`ArgumentParser`.
Partial parsing
^^^^^^^^^^^^^^^
......@@ -1709,6 +1708,20 @@ Customizing file parsing
yield arg
Exiting methods
^^^^^^^^^^^^^^^
.. method:: ArgumentParser.exit(status=0, message=None)
This method terminates the program, exiting with the specified *status*
and, if given, it prints a *message* before that.
.. method:: ArgumentParser.error(message)
This method prints a usage message including the *message* to the
standard output and terminates the program with a status code of 2.
Upgrading optparse code
-----------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment