]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Update tutorial/classes.rst to remove references to the old two-argument form of...
authorCollin Winter <collinw@gmail.com>
Mon, 10 Sep 2007 00:27:23 +0000 (00:27 +0000)
committerCollin Winter <collinw@gmail.com>
Mon, 10 Sep 2007 00:27:23 +0000 (00:27 +0000)
Doc/tutorial/classes.rst

index 93e77cce75deed768ec6fb5abdad1638c2b52a89..696860d5110fc02b567802c38404cf7f36002678 100644 (file)
@@ -586,16 +586,16 @@ Exceptions Are Classes Too
 User-defined exceptions are identified by classes as well.  Using this mechanism
 it is possible to create extensible hierarchies of exceptions.
 
-There are two new valid (semantic) forms for the raise statement::
+There are two valid (semantic) forms for the raise statement::
 
-   raise Class, instance
+   raise Class
 
-   raise instance
+   raise Instance
 
-In the first form, ``instance`` must be an instance of :class:`Class` or of a
-class derived from it.  The second form is a shorthand for::
+In the first form, ``Class`` must be an instance of :class:`type` or of a
+class derived from it.  The first form is a shorthand for::
 
-   raise instance.__class__, instance
+   raise Class()
 
 A class in an except clause is compatible with an exception if it is the same
 class or a base class thereof (but not the other way around --- an except clause