Kaydet (Commit) 2e85f503 authored tarafından Ezio Melotti's avatar Ezio Melotti

#6879 - fix misstatement about exceptions

üst 718b221e
...@@ -218,11 +218,9 @@ exception to occur. For example:: ...@@ -218,11 +218,9 @@ exception to occur. For example::
File "<stdin>", line 1, in ? File "<stdin>", line 1, in ?
NameError: HiThere NameError: HiThere
The argument to :keyword:`raise` is an exception class or instance to be The sole argument to :keyword:`raise` indicates the exception to be raised.
raised. There is a deprecated alternate syntax that separates class and This must be either an exception instance or an exception class (a class that
constructor arguments; the above could be written as ``raise NameError, derives from :class:`Exception`).
'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 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 handle it, a simpler form of the :keyword:`raise` statement allows you to
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment