diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2003-05-29 02:17:23 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2003-05-29 02:17:23 (GMT) |
commit | 847207acffaf35e59601fea7d54f6db6f307e327 (patch) | |
tree | aec3d56d69f4f3f82a300d27122fcdd00a75c0aa /Doc/ref | |
parent | d3d5768e5ecf017d96b71d8ed437267ff47203b1 (diff) | |
download | cpython-847207acffaf35e59601fea7d54f6db6f307e327.zip cpython-847207acffaf35e59601fea7d54f6db6f307e327.tar.gz cpython-847207acffaf35e59601fea7d54f6db6f307e327.tar.bz2 |
SF bug #719367, string exceptions are deprecated
Remove references to string based exceptions in the doc.
Diffstat (limited to 'Doc/ref')
-rw-r--r-- | Doc/ref/ref4.tex | 9 | ||||
-rw-r--r-- | Doc/ref/ref6.tex | 8 |
2 files changed, 5 insertions, 12 deletions
diff --git a/Doc/ref/ref4.tex b/Doc/ref/ref4.tex index 0eb6841..b993266 100644 --- a/Doc/ref/ref4.tex +++ b/Doc/ref/ref4.tex @@ -183,12 +183,9 @@ either case, it prints a stack backtrace, except when the exception is \exception{SystemExit}\withsubitem{(built-in exception)}{\ttindex{SystemExit}}. -Exceptions are identified by string objects or class instances. -Selection of a matching except clause is based on object identity -(i.e., two different string objects with the same value represent -different exceptions!) For string exceptions, the \keyword{except} -clause must reference the same string object. For class exceptions, -the \keyword{except} clause must reference the same class or a base +Exceptions are identified by class instances. +Selection of a matching except clause is based on object identity. +The \keyword{except} clause must reference the same class or a base class of it. When an exception is raised, an object (maybe \code{None}) is passed diff --git a/Doc/ref/ref6.tex b/Doc/ref/ref6.tex index d447f24..a078aa4 100644 --- a/Doc/ref/ref6.tex +++ b/Doc/ref/ref6.tex @@ -521,9 +521,8 @@ from __future__ import generators \end{productionlist} If no expressions are present, \keyword{raise} re-raises the last -expression that was active in the current scope. If no exception has -been active in the current scope, an exception is raised that -indicates indicates that this is the error. +expression that was active in the current scope. If no exception is +active in the current scope, an exception is raised indicating this error. \index{exception} \indexii{raising}{exception} @@ -545,9 +544,6 @@ used, and any other object is treated as a single argument to the constructor. The instance so created by calling the constructor is used as the exception value. -If the first object is a string, the string object is the exception -type, and the second object becomes the exception value. - If a third object is present and not \code{None}, it must be a traceback\obindex{traceback} object (see section~\ref{traceback}), and it is substituted instead of the current location as the place where |