diff options
Diffstat (limited to 'Doc/library/optparse.rst')
-rw-r--r-- | Doc/library/optparse.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/optparse.rst b/Doc/library/optparse.rst index bd0b02a..de1a116 100644 --- a/Doc/library/optparse.rst +++ b/Doc/library/optparse.rst @@ -8,7 +8,7 @@ ``optparse`` is a more convenient, flexible, and powerful library for parsing -command-line options than ``getopt``. ``optparse`` uses a more declarative +command-line options than the old :mod:`getopt` module. ``optparse`` uses a more declarative style of command-line parsing: you create an instance of :class:`OptionParser`, populate it with options, and parse the command line. ``optparse`` allows users to specify options in the conventional GNU/POSIX syntax, and additionally @@ -92,7 +92,7 @@ argument ``sys.argv[1:]``, or of some other list provided as a substitute for ``sys.argv[1:]``". -option +option an argument used to supply extra information to guide or customize the execution of a program. There are many different syntaxes for options; the traditional Unix syntax is a hyphen ("-") followed by a single letter, e.g. ``"-x"`` or @@ -464,7 +464,7 @@ user-friendly (documented) options:: action="store_true", dest="verbose", default=True, help="make lots of noise [default]") parser.add_option("-q", "--quiet", - action="store_false", dest="verbose", + action="store_false", dest="verbose", help="be vewwy quiet (I'm hunting wabbits)") parser.add_option("-f", "--filename", metavar="FILE", help="write output to FILE"), @@ -1632,7 +1632,7 @@ arguments:: setattr(parser.values, option.dest, value) [...] - parser.add_option("-c", "--callback", + parser.add_option("-c", "--callback", dest="vararg_attr", action="callback", callback=vararg_callback) The main weakness with this particular implementation is that negative numbers |