summaryrefslogtreecommitdiff
path: root/Doc/tutorial/errors.rst
diff options
context:
space:
mode:
authorCollin Winter <collinw@gmail.com>2007-09-10 00:31:50 +0000
committerCollin Winter <collinw@gmail.com>2007-09-10 00:31:50 +0000
commit1fd832d91977535776de299af65e76f692633684 (patch)
treece4613f4ab9eaedb5f7aab513b0c939a8b7e973f /Doc/tutorial/errors.rst
parent60180bdbaf46730f4d94f82cebdf4332702695c8 (diff)
downloadcpython-1fd832d91977535776de299af65e76f692633684.tar.gz
Fix more two-arg raise statements.
Diffstat (limited to 'Doc/tutorial/errors.rst')
-rw-r--r--Doc/tutorial/errors.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/tutorial/errors.rst b/Doc/tutorial/errors.rst
index aa367e39f6..87edf1defa 100644
--- a/Doc/tutorial/errors.rst
+++ b/Doc/tutorial/errors.rst
@@ -216,7 +216,7 @@ Raising Exceptions
The :keyword:`raise` statement allows the programmer to force a specified
exception to occur. For example::
- >>> raise NameError, 'HiThere'
+ >>> raise NameError('HiThere')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
NameError: HiThere
@@ -231,7 +231,7 @@ handle it, a simpler form of the :keyword:`raise` statement allows you to
re-raise the exception::
>>> try:
- ... raise NameError, 'HiThere'
+ ... raise NameError('HiThere')
... except NameError:
... print('An exception flew by!')
... raise