diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2009-09-16 13:31:18 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2009-09-16 13:31:18 (GMT) |
commit | c5a6fd743f6d04b03745575a8a6d6dfd6af34195 (patch) | |
tree | a56cc77f514a7fdff7bd1d38cb2bd0097ea68bbd /Doc | |
parent | cba2fd3ac958b4a85f8669ad5de9bafe47866939 (diff) | |
download | cpython-c5a6fd743f6d04b03745575a8a6d6dfd6af34195.zip cpython-c5a6fd743f6d04b03745575a8a6d6dfd6af34195.tar.gz cpython-c5a6fd743f6d04b03745575a8a6d6dfd6af34195.tar.bz2 |
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
........
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/tutorial/errors.rst | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Doc/tutorial/errors.rst b/Doc/tutorial/errors.rst index ebec952..28d6565 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 |