[Python-checkins] python/dist/src/Doc/lib libexcs.tex,1.51,1.52 libsys.tex,1.63,1.64

nnorwitz@users.sourceforge.net nnorwitz@users.sourceforge.net
Wed, 28 May 2003 19:17:25 -0700


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv26664/lib

Modified Files:
	libexcs.tex libsys.tex 
Log Message:
SF bug #719367, string exceptions are deprecated

Remove references to string based exceptions in the doc.


Index: libexcs.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libexcs.tex,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -d -r1.51 -r1.52
*** libexcs.tex	13 May 2003 14:13:58 -0000	1.51
--- libexcs.tex	29 May 2003 02:17:22 -0000	1.52
***************
*** 5,12 ****
  
  
! Exceptions can be class objects or string objects.  Though most
! exceptions have been string objects in past versions of Python, in
! Python 1.5 and newer versions, all standard exceptions have been
! converted to class objects, and users are encouraged to do the same.
  The exceptions are defined in the module \module{exceptions}.  This
  module never needs to be imported explicitly: the exceptions are
--- 5,9 ----
  
  
! Exceptions should be class objects.  
  The exceptions are defined in the module \module{exceptions}.  This
  module never needs to be imported explicitly: the exceptions are
***************
*** 14,17 ****
--- 11,21 ----
  module.
  
+ \begin{notice}
+ In past versions of Python string exceptions were supported.  In
+ Python 1.5 and newer versions, all standard exceptions have been
+ converted to class objects and users are encouraged to do the same.
+ String exceptions will raise a \code{PendingDeprecationWarning}.
+ In future versions, support for string exceptions will be removed.
+ 
  Two distinct string objects with the same value are considered different
  exceptions.  This is done to force programmers to use exception names
***************
*** 20,23 ****
--- 24,28 ----
  not a requirement for user-defined exceptions or exceptions defined by
  library modules.
+ \end{notice}
  
  For class exceptions, in a \keyword{try}\stindex{try} statement with

Index: libsys.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsys.tex,v
retrieving revision 1.63
retrieving revision 1.64
diff -C2 -d -r1.63 -r1.64
*** libsys.tex	5 Mar 2003 15:13:38 -0000	1.63
--- libsys.tex	29 May 2003 02:17:23 -0000	1.64
***************
*** 92,96 ****
    values returned are \code{(\var{type}, \var{value},
    \var{traceback})}.  Their meaning is: \var{type} gets the exception
!   type of the exception being handled (a string or class object);
    \var{value} gets the exception parameter (its \dfn{associated value}
    or the second argument to \keyword{raise}, which is always a class
--- 92,96 ----
    values returned are \code{(\var{type}, \var{value},
    \var{traceback})}.  Their meaning is: \var{type} gets the exception
!   type of the exception being handled (a class object);
    \var{value} gets the exception parameter (its \dfn{associated value}
    or the second argument to \keyword{raise}, which is always a class