summaryrefslogtreecommitdiff
path: root/Doc/ref
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-03-17 05:49:33 +0000
committerNeal Norwitz <nnorwitz@gmail.com>2006-03-17 05:49:33 +0000
commit1dc0d91ba69c955d5cb29fed8e9b67bca62ccfe5 (patch)
treeefacb822fece2a49ae58f33e5825f0849982cab9 /Doc/ref
parent0bc5b7f1a2d29503e8907309033bc29bd836da67 (diff)
downloadcpython-1dc0d91ba69c955d5cb29fed8e9b67bca62ccfe5.tar.gz
Remove sys.exc_type, sys.exc_value, sys.exc_traceback
Diffstat (limited to 'Doc/ref')
-rw-r--r--Doc/ref/ref7.tex20
1 files changed, 7 insertions, 13 deletions
diff --git a/Doc/ref/ref7.tex b/Doc/ref/ref7.tex
index 4ae6040fbd..90627a485f 100644
--- a/Doc/ref/ref7.tex
+++ b/Doc/ref/ref7.tex
@@ -250,21 +250,15 @@ occurs in the try clause of the inner handler, the outer handler will
not handle the exception.)
Before an except clause's suite is executed, details about the
-exception are assigned to three variables in the
-\module{sys}\refbimodindex{sys} module: \code{sys.exc_type} receives
-the object identifying the exception; \code{sys.exc_value} receives
-the exception's parameter; \code{sys.exc_traceback} receives a
+exception are stored in the \module{sys}\refbimodindex{sys} module
+and can be access via \function{sys.exc_info()}. \function{sys.exc_info()}
+returns a 3-tuple consisting of: \code{exc_type} receives
+the object identifying the exception; \code{exc_value} receives
+the exception's parameter; \code{exc_traceback} receives a
traceback object\obindex{traceback} (see section~\ref{traceback})
identifying the point in the program where the exception occurred.
-These details are also available through the \function{sys.exc_info()}
-function, which returns a tuple \code{(\var{exc_type}, \var{exc_value},
-\var{exc_traceback})}. Use of the corresponding variables is
-deprecated in favor of this function, since their use is unsafe in a
-threaded program. As of Python 1.5, the variables are restored to
-their previous values (before the call) when returning from a function
-that handled an exception.
-\withsubitem{(in module sys)}{\ttindex{exc_type}
- \ttindex{exc_value}\ttindex{exc_traceback}}
+\function{sys.exc_info()} values are restored to their previous values
+(before the call) when returning from a function that handled an exception.
The optional \keyword{else} clause is executed if and when control
flows off the end of the \keyword{try} clause.\footnote{