diff options
Diffstat (limited to 'Lib/optparse.py')
-rw-r--r-- | Lib/optparse.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/optparse.py b/Lib/optparse.py index d0d59616f3..731a2bb5ed 100644 --- a/Lib/optparse.py +++ b/Lib/optparse.py @@ -813,7 +813,7 @@ class Option: parser.print_version() parser.exit() else: - raise RuntimeError, "unknown action %r" % self.action + raise ValueError("unknown action %r" % self.action) return 1 @@ -1131,6 +1131,11 @@ class OptionParser (OptionContainer): prog : string the name of the current program (to override os.path.basename(sys.argv[0])). + description : string + A paragraph of text giving a brief overview of your program. + optparse reformats this paragraph to fit the current terminal + width and prints it when the user requests help (after usage, + but before the list of options). epilog : string paragraph of help text to print after option help |