mirror of
https://github.com/python/cpython.git
synced 2025-11-13 07:26:31 +00:00
Logical markup.
Index entry.
This commit is contained in:
parent
c07ae9f4d2
commit
266b4c1506
2 changed files with 24 additions and 24 deletions
|
|
@ -2,7 +2,6 @@
|
||||||
\label{module-traceback}
|
\label{module-traceback}
|
||||||
\stmodindex{traceback}
|
\stmodindex{traceback}
|
||||||
|
|
||||||
\setindexsubitem{(in module traceback)}
|
|
||||||
|
|
||||||
This module provides a standard interface to format and print stack
|
This module provides a standard interface to format and print stack
|
||||||
traces of Python programs. It exactly mimics the behavior of the
|
traces of Python programs. It exactly mimics the behavior of the
|
||||||
|
|
@ -13,15 +12,16 @@ you want to print stack traces under program control, e.g. in a
|
||||||
The module uses traceback objects --- this is the object type
|
The module uses traceback objects --- this is the object type
|
||||||
that is stored in the variables \code{sys.exc_traceback} and
|
that is stored in the variables \code{sys.exc_traceback} and
|
||||||
\code{sys.last_traceback}.
|
\code{sys.last_traceback}.
|
||||||
|
\obindex{traceback}
|
||||||
|
|
||||||
The module defines the following functions:
|
The module defines the following functions:
|
||||||
|
|
||||||
\begin{funcdesc}{print_tb}{traceback\optional{\, limit}}
|
\begin{funcdesc}{print_tb}{traceback\optional{, limit}}
|
||||||
Print up to \var{limit} stack trace entries from \var{traceback}. If
|
Print up to \var{limit} stack trace entries from \var{traceback}. If
|
||||||
\var{limit} is omitted or \code{None}, all entries are printed.
|
\var{limit} is omitted or \code{None}, all entries are printed.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{extract_tb}{traceback\optional{\, limit}}
|
\begin{funcdesc}{extract_tb}{traceback\optional{, limit}}
|
||||||
Return a list of up to \var{limit} ``pre-processed'' stack trace
|
Return a list of up to \var{limit} ``pre-processed'' stack trace
|
||||||
entries extracted from \var{traceback}. It is useful for alternate
|
entries extracted from \var{traceback}. It is useful for alternate
|
||||||
formatting of stack traces. If \var{limit} is omitted or \code{None},
|
formatting of stack traces. If \var{limit} is omitted or \code{None},
|
||||||
|
|
@ -33,23 +33,23 @@ trailing whitespace stripped; if the source is not available it is
|
||||||
\code{None}.
|
\code{None}.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{print_exception}{type\, value\, traceback\optional{\, limit}}
|
\begin{funcdesc}{print_exception}{type, value, traceback\optional{, limit}}
|
||||||
Print exception information and up to \var{limit} stack trace entries
|
Print exception information and up to \var{limit} stack trace entries
|
||||||
from \var{traceback}. This differs from \code{print_tb} in the
|
from \var{traceback}. This differs from \function{print_tb()} in the
|
||||||
following ways: (1) if \var{traceback} is not \code{None}, it prints a
|
following ways: (1) if \var{traceback} is not \code{None}, it prints a
|
||||||
header ``\code{Traceback (innermost last):}''; (2) it prints the
|
header \samp{Traceback (innermost last):}; (2) it prints the
|
||||||
exception \var{type} and \var{value} after the stack trace; (3) if
|
exception \var{type} and \var{value} after the stack trace; (3) if
|
||||||
\var{type} is \code{SyntaxError} and \var{value} has the appropriate
|
\var{type} is \exception{SyntaxError} and \var{value} has the appropriate
|
||||||
format, it prints the line where the syntax error occurred with a
|
format, it prints the line where the syntax error occurred with a
|
||||||
caret indication the approximate position of the error.
|
caret indicating the approximate position of the error.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{print_exc}{\optional{limit}}
|
\begin{funcdesc}{print_exc}{\optional{limit}}
|
||||||
This is a shorthand for \code{print_exception(sys.exc_type,}
|
This is a shorthand for `\code{print_exception(sys.exc_type,}
|
||||||
\code{sys.exc_value,} \code{sys.exc_traceback,} \code{limit)}.
|
\code{sys.exc_value,} \code{sys.exc_traceback,} \var{limit}\code{)}'.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{print_last}{\optional{limit}}
|
\begin{funcdesc}{print_last}{\optional{limit}}
|
||||||
This is a shorthand for \code{print_exception(sys.last_type,}
|
This is a shorthand for `\code{print_exception(sys.last_type,}
|
||||||
\code{sys.last_value,} \code{sys.last_traceback,} \code{limit)}.
|
\code{sys.last_value,} \code{sys.last_traceback,} \var{limit}\code{)}'.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
\label{module-traceback}
|
\label{module-traceback}
|
||||||
\stmodindex{traceback}
|
\stmodindex{traceback}
|
||||||
|
|
||||||
\setindexsubitem{(in module traceback)}
|
|
||||||
|
|
||||||
This module provides a standard interface to format and print stack
|
This module provides a standard interface to format and print stack
|
||||||
traces of Python programs. It exactly mimics the behavior of the
|
traces of Python programs. It exactly mimics the behavior of the
|
||||||
|
|
@ -13,15 +12,16 @@ you want to print stack traces under program control, e.g. in a
|
||||||
The module uses traceback objects --- this is the object type
|
The module uses traceback objects --- this is the object type
|
||||||
that is stored in the variables \code{sys.exc_traceback} and
|
that is stored in the variables \code{sys.exc_traceback} and
|
||||||
\code{sys.last_traceback}.
|
\code{sys.last_traceback}.
|
||||||
|
\obindex{traceback}
|
||||||
|
|
||||||
The module defines the following functions:
|
The module defines the following functions:
|
||||||
|
|
||||||
\begin{funcdesc}{print_tb}{traceback\optional{\, limit}}
|
\begin{funcdesc}{print_tb}{traceback\optional{, limit}}
|
||||||
Print up to \var{limit} stack trace entries from \var{traceback}. If
|
Print up to \var{limit} stack trace entries from \var{traceback}. If
|
||||||
\var{limit} is omitted or \code{None}, all entries are printed.
|
\var{limit} is omitted or \code{None}, all entries are printed.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{extract_tb}{traceback\optional{\, limit}}
|
\begin{funcdesc}{extract_tb}{traceback\optional{, limit}}
|
||||||
Return a list of up to \var{limit} ``pre-processed'' stack trace
|
Return a list of up to \var{limit} ``pre-processed'' stack trace
|
||||||
entries extracted from \var{traceback}. It is useful for alternate
|
entries extracted from \var{traceback}. It is useful for alternate
|
||||||
formatting of stack traces. If \var{limit} is omitted or \code{None},
|
formatting of stack traces. If \var{limit} is omitted or \code{None},
|
||||||
|
|
@ -33,23 +33,23 @@ trailing whitespace stripped; if the source is not available it is
|
||||||
\code{None}.
|
\code{None}.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{print_exception}{type\, value\, traceback\optional{\, limit}}
|
\begin{funcdesc}{print_exception}{type, value, traceback\optional{, limit}}
|
||||||
Print exception information and up to \var{limit} stack trace entries
|
Print exception information and up to \var{limit} stack trace entries
|
||||||
from \var{traceback}. This differs from \code{print_tb} in the
|
from \var{traceback}. This differs from \function{print_tb()} in the
|
||||||
following ways: (1) if \var{traceback} is not \code{None}, it prints a
|
following ways: (1) if \var{traceback} is not \code{None}, it prints a
|
||||||
header ``\code{Traceback (innermost last):}''; (2) it prints the
|
header \samp{Traceback (innermost last):}; (2) it prints the
|
||||||
exception \var{type} and \var{value} after the stack trace; (3) if
|
exception \var{type} and \var{value} after the stack trace; (3) if
|
||||||
\var{type} is \code{SyntaxError} and \var{value} has the appropriate
|
\var{type} is \exception{SyntaxError} and \var{value} has the appropriate
|
||||||
format, it prints the line where the syntax error occurred with a
|
format, it prints the line where the syntax error occurred with a
|
||||||
caret indication the approximate position of the error.
|
caret indicating the approximate position of the error.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{print_exc}{\optional{limit}}
|
\begin{funcdesc}{print_exc}{\optional{limit}}
|
||||||
This is a shorthand for \code{print_exception(sys.exc_type,}
|
This is a shorthand for `\code{print_exception(sys.exc_type,}
|
||||||
\code{sys.exc_value,} \code{sys.exc_traceback,} \code{limit)}.
|
\code{sys.exc_value,} \code{sys.exc_traceback,} \var{limit}\code{)}'.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{print_last}{\optional{limit}}
|
\begin{funcdesc}{print_last}{\optional{limit}}
|
||||||
This is a shorthand for \code{print_exception(sys.last_type,}
|
This is a shorthand for `\code{print_exception(sys.last_type,}
|
||||||
\code{sys.last_value,} \code{sys.last_traceback,} \code{limit)}.
|
\code{sys.last_value,} \code{sys.last_traceback,} \var{limit}\code{)}'.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue