Commit d1c797e6 authored by Greg Ward's avatar Greg Ward

SF #1366250: optparse docs: fix inconsistency in variable name; minor tweaks.

parent 19302d92
...@@ -1197,16 +1197,16 @@ its \method{parse{\_}args()} method: ...@@ -1197,16 +1197,16 @@ its \method{parse{\_}args()} method:
where the input parameters are where the input parameters are
\begin{description} \begin{description}
\item[\code{args}] \item[\code{args}]
the list of arguments to process (\code{sys.argv{[}1:]} by default) the list of arguments to process (default: \code{sys.argv{[}1:]})
\item[\code{options}] \item[\code{options}]
object to store option arguments in (a new instance of object to store option arguments in (default: a new instance of
optparse.Values by default) optparse.Values)
\end{description} \end{description}
and the return values are and the return values are
\begin{description} \begin{description}
\item[\code{options}] \item[\code{options}]
the same object as was passed in as \code{options}, or the new the same object that was passed in as \code{options}, or the
optparse.Values instance created by \module{optparse} optparse.Values instance created by \module{optparse}
\item[\code{args}] \item[\code{args}]
the leftover positional arguments after all options have been the leftover positional arguments after all options have been
...@@ -1214,9 +1214,9 @@ processed ...@@ -1214,9 +1214,9 @@ processed
\end{description} \end{description}
The most common usage is to supply neither keyword argument. If you The most common usage is to supply neither keyword argument. If you
supply a \code{values} object, it will be repeatedly modified with a supply \code{options}, it will be modified with repeated \code{setattr()}
\code{setattr()} call for every option argument written to an option calls (roughly one for every option argument stored to an option
destination, and finally returned by \method{parse{\_}args()}. destination) and returned by \method{parse{\_}args()}.
If \method{parse{\_}args()} encounters any errors in the argument list, it calls If \method{parse{\_}args()} encounters any errors in the argument list, it calls
the OptionParser's \method{error()} method with an appropriate end-user error the OptionParser's \method{error()} method with an appropriate end-user error
......
...@@ -145,6 +145,8 @@ Extension Modules ...@@ -145,6 +145,8 @@ Extension Modules
Library Library
------- -------
- Bug #1366250: minor optparse documentation error.
- Bug #1361643: fix textwrap.dedent() so it handles tabs appropriately; - Bug #1361643: fix textwrap.dedent() so it handles tabs appropriately;
clarify docs. clarify docs.
......
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