summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial
diff options
context:
space:
mode:
authorCollin Winter <collinw@gmail.com>2007-09-10 00:31:50 (GMT)
committerCollin Winter <collinw@gmail.com>2007-09-10 00:31:50 (GMT)
commit596d99aa63db5d530d4961e03b7d42f0f9b776fd (patch)
treeff398cb9a5e2bddcb9ba58a321f02479012257df /Doc/tutorial
parentbbc9712629c91ba78ffa26531f82e2730acbf395 (diff)
downloadcpython-596d99aa63db5d530d4961e03b7d42f0f9b776fd.zip
cpython-596d99aa63db5d530d4961e03b7d42f0f9b776fd.tar.gz
cpython-596d99aa63db5d530d4961e03b7d42f0f9b776fd.tar.bz2
Fix more two-arg raise statements.
Diffstat (limited to 'Doc/tutorial')
-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 aa367e3..87edf1d 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