diff -r 0aecf0d22e42 -r fc31e5e2968f Doc/library/argparse.rst --- a/Doc/library/argparse.rst Thu Sep 30 08:09:18 2010 +0200 +++ b/Doc/library/argparse.rst Thu Sep 30 20:35:15 2010 +0200 @@ -1709,6 +1709,19 @@ yield arg +Exiting methods +^^^^^^^^^^^^^^^ + +.. method:: ArgumentParse.exit(status=0, message=None) + + This method terminates the program, exiting with the specified ``status`` + and, if defined, it prints a ``message`` before that. + +.. method:: ArgumentParse.error(message) + + It prints a usage message including the ``message`` to the standard output + and exists (with status = 2). + Upgrading optparse code -----------------------