diff Doc/tutorial/errors.rst @ 43308:b27d349162bd

More two-argument raise cleanup in the tutorial.
author Collin Winter <collinw@gmail.com>
date Mon, 10 Sep 2007 00:36:57 +0000
parents 875052c2b7b3
children 09287f2055ab
line wrap: on
line diff
--- a/Doc/tutorial/errors.rst	Mon Sep 10 00:32:45 2007 +0000
+++ b/Doc/tutorial/errors.rst	Mon Sep 10 00:36:57 2007 +0000
@@ -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