[Python-checkins] CVS: python/dist/src/Doc/lib libcmd.tex,1.7,1.7.2.1
Fred L. Drake
fdrake@users.sourceforge.net
2001年12月26日 21:09:47 -0800
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv30837/lib
Modified Files:
Tag: release21-maint
libcmd.tex
Log Message:
Elaborate the descriptions for onecmd(), precmd(), and postcmd() so they are
useful. Includes one correction in the precmd() description.
Index: libcmd.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcmd.tex,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -C2 -d -r1.7 -r1.7.2.1
*** libcmd.tex 2001年03月24日 19:17:35 1.7
--- libcmd.tex 2001年12月27日 05:09:45 1.7.2.1
***************
*** 57,62 ****
\begin{methoddesc}{onecmd}{str}
! Interpret the argument as though it had been typed in in
! response to the prompt.
\end{methoddesc}
--- 57,65 ----
\begin{methoddesc}{onecmd}{str}
! Interpret the argument as though it had been typed in response to the
! prompt. This may be overridden, but should not normally need to be;
! see the \method{precmd()} and \method{postcmd()} methods for useful
! execution hooks. The return value is a flag indicating whether
! interpretation of commands by the interpreter should stop.
\end{methoddesc}
***************
*** 74,86 ****
\begin{methoddesc}{precmd}{}
! Hook method executed just before the input prompt is issued. This
method is a stub in \class{Cmd}; it exists to be overridden by
! subclasses.
\end{methoddesc}
! \begin{methoddesc}{postcmd}{}
Hook method executed just after a command dispatch is finished. This
method is a stub in \class{Cmd}; it exists to be overridden by
! subclasses.
\end{methoddesc}
--- 77,99 ----
\begin{methoddesc}{precmd}{}
! Hook method executed just before the command line \var{line} is
! interpreted, but after the input prompt is generated and issued. This
method is a stub in \class{Cmd}; it exists to be overridden by
! subclasses. The return value is used as the command which will be
! executed by the \method{onecmd()} method; the \method{precmd()}
! implementation may re-write the command or simply return \var{line}
! unchanged.
\end{methoddesc}
! \begin{methoddesc}{postcmd}{stop, line}
Hook method executed just after a command dispatch is finished. This
method is a stub in \class{Cmd}; it exists to be overridden by
! subclasses. \var{line} is the command line which was executed, and
! \var{stop} is a flag which indicates whether execution will be
! terminated after the call to \method{postcmd()}; this will be the
! return value of the \method{onecmd()} method. The return value of
! this method will be used as the new value for the internal flag which
! corresponds to \var{stop}; returning false will cause interpretation
! to continue.
\end{methoddesc}