[Python-checkins] CVS: python/dist/src/Doc/lib libexcs.tex,1.23.4.1,1.23.4.2
Fred L. Drake
python-dev@python.org
Wed, 22 Mar 2000 16:44:57 -0500 (EST)
Update of /projects/cvsroot/python/dist/src/Doc/lib
In directory weyr:/home/fdrake/projects/python/Doc-152p2/lib
Modified Files:
Tag: release152p1-patches
libexcs.tex
Log Message:
Make it clear that the built-in exceptions will be class-based in 1.6,
and that -X will disappear.
Minor markup nits.
Index: libexcs.tex
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Doc/lib/libexcs.tex,v
retrieving revision 1.23.4.1
retrieving revision 1.23.4.2
diff -C2 -r1.23.4.1 -r1.23.4.2
*** libexcs.tex 1999/11/05 20:45:12 1.23.4.1
--- libexcs.tex 2000/03/22 21:44:54 1.23.4.2
***************
*** 14,27 ****
For backward compatibility, when Python is invoked with the
\code{-X} option, most of the standard exceptions are
! strings\footnote{
For forward-compatibility the new exceptions
\exception{Exception}, \exception{LookupError},
\exception{ArithmeticError}, \exception{EnvironmentError},
and \exception{StandardError} are tuples.
! }. This option may be used to run code that breaks because of the
! different semantics of class based exceptions. The \code{-X} option
! will become obsolete in future Python versions, so the recommended
! solution is to fix the code.
Two distinct string objects with the same value are considered different
exceptions. This is done to force programmers to use exception names
--- 14,29 ----
For backward compatibility, when Python is invoked with the
\code{-X} option, most of the standard exceptions are
! strings.\footnote{
For forward-compatibility the new exceptions
\exception{Exception}, \exception{LookupError},
\exception{ArithmeticError}, \exception{EnvironmentError},
and \exception{StandardError} are tuples.
! } This option may be used to run code that breaks because of the
! different semantics of class based exceptions.
+ \strong{Deprecation warning:} The \code{-X} option will be removed in
+ Python 1.6, so the recommended solution is to adjust all code to work
+ with class-based exceptions.
+
Two distinct string objects with the same value are considered different
exceptions. This is done to force programmers to use exception names
***************
*** 64,67 ****
--- 66,70 ----
exceptions. When string-based standard exceptions are used, they
are tuples containing the directly derived classes.
+ \strong{Note:} These will always be classes in Python 1.6.
\begin{excdesc}{Exception}