[Python-checkins] r74827 - in python/branches/release26-maint: Doc/tutorial/errors.rst

ezio.melotti python-checkins at python.org
Wed Sep 16 15:31:18 CEST 2009


Author: ezio.melotti
Date: Wed Sep 16 15:31:18 2009
New Revision: 74827

Log:
Merged revisions 74825 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74825 | ezio.melotti | 2009-09-16 16:14:05 +0300 (Wed, 16 Sep 2009) | 1 line
  
  #6879 - fix misstatement about exceptions
........


Modified:
   python/branches/release26-maint/   (props changed)
   python/branches/release26-maint/Doc/tutorial/errors.rst

Modified: python/branches/release26-maint/Doc/tutorial/errors.rst
==============================================================================
--- python/branches/release26-maint/Doc/tutorial/errors.rst	(original)
+++ python/branches/release26-maint/Doc/tutorial/errors.rst	Wed Sep 16 15:31:18 2009
@@ -221,10 +221,9 @@
      File "<stdin>", line 1, in ?
    NameError: HiThere
 
-The first argument to :keyword:`raise` names the exception to be raised.  The
-optional second argument specifies the exception's argument.  Alternatively, the
-above could be written as ``raise NameError('HiThere')``.  Either form works
-fine, but there seems to be a growing stylistic preference for the latter.
+The sole argument to :keyword:`raise` indicates the exception to be raised.
+This must be either an exception instance or an exception class (a class that
+derives from :class:`Exception`).
 
 If you need to determine whether an exception was raised but don't intend to
 handle it, a simpler form of the :keyword:`raise` statement allows you to


More information about the Python-checkins mailing list