diff Doc/tutorial/errors.rst @ 43306:9f7f3147031c

Fix more two-arg raise statements.
author Collin Winter <collinw@gmail.com>
date Mon, 10 Sep 2007 00:31:50 +0000
parents 655071bf6c45
children 875052c2b7b3
line wrap: on
line diff
--- a/Doc/tutorial/errors.rst	Mon Sep 10 00:27:23 2007 +0000
+++ b/Doc/tutorial/errors.rst	Mon Sep 10 00:31:50 2007 +0000
@@ -216,7 +216,7 @@
 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 @@
 re-raise the exception::
 
    >>> try:
-   ...     raise NameError, 'HiThere'
+   ...     raise NameError('HiThere')
    ... except NameError:
    ...     print('An exception flew by!')
    ...     raise