Mercurial > cpython-lru_cache-weakref
diff Doc/tutorial/errors.rst @ 55991:3385e6182112 legacy-trunk
#6879 - fix misstatement about exceptions
| author | Ezio Melotti <ezio.melotti@gmail.com> |
|---|---|
| date | Wed, 16 Sep 2009 13:14:05 +0000 |
| parents | bb6ade51a0b6 |
| children | b36cb4602e21 |
line wrap: on
line diff
--- a/Doc/tutorial/errors.rst Wed Sep 16 13:11:06 2009 +0000 +++ b/Doc/tutorial/errors.rst Wed Sep 16 13:14:05 2009 +0000 @@ -218,11 +218,9 @@ File "<stdin>", line 1, in ? NameError: HiThere -The argument to :keyword:`raise` is an exception class or instance to be -raised. There is a deprecated alternate syntax that separates class and -constructor arguments; the above could be written as ``raise NameError, -'HiThere'``. Since it once was the only one available, the latter form is -prevalent in older code. +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
