summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorKa-Ping Yee <ping@zesty.ca>2001-03-23 05:17:41 (GMT)
committerKa-Ping Yee <ping@zesty.ca>2001-03-23 05:17:41 (GMT)
commitc608fb6389da91e159b7e7f55c11ccb9e64f3623 (patch)
tree545e7c42b31e5469a4f54ef31b46dacb824eccb0 /Doc
parentf170d7fea7021843e7831832f5f11ca428699149 (diff)
downloadcpython-c608fb6389da91e159b7e7f55c11ccb9e64f3623.zip
cpython-c608fb6389da91e159b7e7f55c11ccb9e64f3623.tar.gz
cpython-c608fb6389da91e159b7e7f55c11ccb9e64f3623.tar.bz2
Give a slightly better explanation of excepthook.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/lib/libsys.tex10
1 files changed, 6 insertions, 4 deletions
diff --git a/Doc/lib/libsys.tex b/Doc/lib/libsys.tex
index 44b7853..be5a599 100644
--- a/Doc/lib/libsys.tex
+++ b/Doc/lib/libsys.tex
@@ -51,19 +51,21 @@ If \var{value} is not \code{None}, this function prints it to
\code{sys.displayhook} is called on the result of evaluating
an expression entered in an interactive Python session.
The display of these values can be customized by assigning
-another function to \code{sys.displayhook}.
+another one-argument function to \code{sys.displayhook}.
\end{funcdesc}
\begin{funcdesc}{excepthook}{\var{type}, \var{value}, \var{traceback}}
This function prints out a given traceback and exception to
\code{sys.stderr}.
-\code{sys.excepthook} is called when an exception is raised
-and uncaught. In an interactive session this happens just before
+When an exception is raised and uncaught, the interpreter calls
+\code{sys.excepthook} with three arguments, the exception class,
+exception instance, and a traceback object.
+In an interactive session this happens just before
control is returned to the prompt; in a Python program this happens
just before the program exits.
The handling of such top-level exceptions can be customized by
-assigning another function to \code{sys.excepthook}.
+assigning another three-argument function to \code{sys.excepthook}.
\end{funcdesc}
\begin{datadesc}{__displayhook__}