summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial/errors.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/tutorial/errors.rst')
-rw-r--r--Doc/tutorial/errors.rst8
1 files changed, 5 insertions, 3 deletions
diff --git a/Doc/tutorial/errors.rst b/Doc/tutorial/errors.rst
index 28d6565..d547ef7 100644
--- a/Doc/tutorial/errors.rst
+++ b/Doc/tutorial/errors.rst
@@ -221,9 +221,11 @@ exception to occur. For example::
File "<stdin>", line 1, in ?
NameError: HiThere
-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`).
+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.
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