]> granicus.if.org Git - python/commitdiff
Fix more two-arg raise statements.
authorCollin Winter <collinw@gmail.com>
Mon, 10 Sep 2007 00:31:50 +0000 (00:31 +0000)
committerCollin Winter <collinw@gmail.com>
Mon, 10 Sep 2007 00:31:50 +0000 (00:31 +0000)
Doc/tutorial/errors.rst

index aa367e39f652027c96a702f87ce9c0ab7ee2e983..87edf1defae70235e9867c4377f601e7ea6a185d 100644 (file)
@@ -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