[Python-3000-checkins] r58076 - python/branches/py3k/Doc/tutorial/errors.rst

collin.winter python-3000-checkins at python.org
Mon Sep 10 02:36:58 CEST 2007


Author: collin.winter
Date: Mon Sep 10 02:36:57 2007
New Revision: 58076

Modified:
   python/branches/py3k/Doc/tutorial/errors.rst
Log:
More two-argument raise cleanup in the tutorial.

Modified: python/branches/py3k/Doc/tutorial/errors.rst
==============================================================================
--- python/branches/py3k/Doc/tutorial/errors.rst	(original)
+++ python/branches/py3k/Doc/tutorial/errors.rst	Mon Sep 10 02:36:57 2007
@@ -221,10 +221,9 @@
      File "<stdin>", line 1, in ?
    NameError: HiThere
 
-The first argument to :keyword:`raise` names the exception to be raised.  The
-optional second argument specifies the exception's argument.  Alternatively, the
-above could be written as ``raise NameError('HiThere')``.  Either form works
-fine, but there seems to be a growing stylistic preference for the latter.
+The sole argument to :keyword:`raise` indicates the exception to be raised.
+This must be either an exception instance or an exception class (a class that
+derives from :class:`Exception`).
 
 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


More information about the Python-3000-checkins mailing list