Mercurial > cpython-lru_cache-weakref
diff Doc/lib/liboptparse.tex @ 35271:a917e2c476f6 2.4
SF #1204347: typo fix.
| author | Greg Ward <gward@python.net> |
|---|---|
| date | Fri, 22 Jul 2005 01:54:54 +0000 |
| parents | 336fea406fcf |
| children |
line wrap: on
line diff
--- a/Doc/lib/liboptparse.tex Wed Jul 20 22:52:09 2005 +0000 +++ b/Doc/lib/liboptparse.tex Fri Jul 22 01:54:54 2005 +0000 @@ -584,7 +584,7 @@ There are two broad classes of errors that \module{optparse} has to worry about: programmer errors and user errors. Programmer errors are usually -erroneous calls to \code{parse.add{\_}option()}, e.g. invalid option strings, +erroneous calls to \code{parser.add{\_}option()}, e.g. invalid option strings, unknown option attributes, missing option attributes, etc. These are dealt with in the usual way: raise an exception (either \code{optparse.OptionError} or \code{TypeError}) and let the program crash. @@ -1347,7 +1347,7 @@ To avoid this confusion, use \method{set{\_}defaults()}: \begin{verbatim} -parse.set_defaults(mode="advanced") +parser.set_defaults(mode="advanced") parser.add_option("--advanced", action="store_const", dest="mode", const="advanced") parser.add_option("--novice", action="store_const",
