summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorCollin Winter <collinw@gmail.com>2007-09-10 00:36:57 (GMT)
committerCollin Winter <collinw@gmail.com>2007-09-10 00:36:57 (GMT)
commitc7526f5b3eaf8e2e4ad81ea479b85418a7f032f4 (patch)
treefe6f859e87bfcb7d88902967fc95386aaca5f491 /Doc
parent1fc035ff63b605a277494dcc7c39cccb9a2f57c0 (diff)
downloadcpython-c7526f5b3eaf8e2e4ad81ea479b85418a7f032f4.zip
cpython-c7526f5b3eaf8e2e4ad81ea479b85418a7f032f4.tar.gz
cpython-c7526f5b3eaf8e2e4ad81ea479b85418a7f032f4.tar.bz2
More two-argument raise cleanup in the tutorial.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/tutorial/errors.rst7
1 files changed, 3 insertions, 4 deletions
diff --git a/Doc/tutorial/errors.rst b/Doc/tutorial/errors.rst
index 8281c7f..706e2c0 100644
--- a/Doc/tutorial/errors.rst
+++ b/Doc/tutorial/errors.rst
@@ -221,10 +221,9 @@ exception to occur. For example::
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