[Python-checkins] python/dist/src/Doc/lib libtraceback.tex,1.14,1.14.22.1
fdrake@users.sourceforge.net
fdrake@users.sourceforge.net
Thu, 25 Jul 2002 14:11:44 -0700
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv621/lib
Modified Files:
Tag: release22-maint
libtraceback.tex
Log Message:
Small clarifications when referring to the sys.exc_* variables so that
readers are not given the wrong impression that they should be using those
on a regualar basis.
This closes SF bug #585598.
Index: libtraceback.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtraceback.tex,v
retrieving revision 1.14
retrieving revision 1.14.22.1
diff -C2 -d -r1.14 -r1.14.22.1
*** libtraceback.tex 14 Feb 2001 03:20:18 -0000 1.14
--- libtraceback.tex 25 Jul 2002 21:11:41 -0000 1.14.22.1
***************
*** 9,17 ****
stack traces of Python programs. It exactly mimics the behavior of
the Python interpreter when it prints a stack trace. This is useful
! when you want to print stack traces under program control, e.g. in a
``wrapper'' around the interpreter.
! The module uses traceback objects --- this is the object type
! that is stored in the variables \code{sys.exc_traceback} and
\code{sys.last_traceback} and returned as the third item from
\function{sys.exc_info()}.
--- 9,17 ----
stack traces of Python programs. It exactly mimics the behavior of
the Python interpreter when it prints a stack trace. This is useful
! when you want to print stack traces under program control, such as in a
``wrapper'' around the interpreter.
! The module uses traceback objects --- this is the object type that is
! stored in the variables \code{sys.exc_traceback} (deprecated) and
\code{sys.last_traceback} and returned as the third item from
\function{sys.exc_info()}.
***************
*** 36,55 ****
header \samp{Traceback (most recent call last):}; (2) it prints the
exception \var{type} and \var{value} after the stack trace; (3) if
! \var{type} is \exception{SyntaxError} and \var{value} has the appropriate
! format, it prints the line where the syntax error occurred with a
! caret indicating the approximate position of the error.
\end{funcdesc}
\begin{funcdesc}{print_exc}{\optional{limit\optional{, file}}}
! This is a shorthand for `\code{print_exception(sys.exc_type,}
! \code{sys.exc_value,} \code{sys.exc_traceback,} \var{limit}\code{,}
! \var{file}\code{)}'. (In fact, it uses \code{sys.exc_info()} to
! retrieve the same information in a thread-safe way.)
\end{funcdesc}
\begin{funcdesc}{print_last}{\optional{limit\optional{, file}}}
! This is a shorthand for `\code{print_exception(sys.last_type,}
! \code{sys.last_value,} \code{sys.last_traceback,} \var{limit}\code{,}
! \var{file}\code{)}'.
\end{funcdesc}
--- 36,55 ----
header \samp{Traceback (most recent call last):}; (2) it prints the
exception \var{type} and \var{value} after the stack trace; (3) if
! \var{type} is \exception{SyntaxError} and \var{value} has the
! appropriate format, it prints the line where the syntax error occurred
! with a caret indicating the approximate position of the error.
\end{funcdesc}
\begin{funcdesc}{print_exc}{\optional{limit\optional{, file}}}
! This is a shorthand for \code{print_exception(sys.exc_type,
! sys.exc_value, sys.exc_traceback, \var{limit}, \var{file})}. (In
! fact, it uses \function{sys.exc_info()} to retrieve the same
! information in a thread-safe way instead of using the deprecated
! variables.)
\end{funcdesc}
\begin{funcdesc}{print_last}{\optional{limit\optional{, file}}}
! This is a shorthand for \code{print_exception(sys.last_type,
! sys.last_value, sys.last_traceback, \var{limit}, \var{file})}.
\end{funcdesc}
***************
*** 94,99 ****
\code{sys.last_value}. The return value is a list of strings, each
ending in a newline. Normally, the list contains a single string;
! however, for \code{SyntaxError} exceptions, it contains several lines
! that (when printed) display detailed information about where the
syntax error occurred. The message indicating which exception
occurred is the always last string in the list.
--- 94,99 ----
\code{sys.last_value}. The return value is a list of strings, each
ending in a newline. Normally, the list contains a single string;
! however, for \exception{SyntaxError} exceptions, it contains several
! lines that (when printed) display detailed information about where the
syntax error occurred. The message indicating which exception
occurred is the always last string in the list.