summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorCollin Winter <collinw@gmail.com>2007-09-10 00:27:23 (GMT)
committerCollin Winter <collinw@gmail.com>2007-09-10 00:27:23 (GMT)
commitbbc9712629c91ba78ffa26531f82e2730acbf395 (patch)
tree0e44d38258dfeff9ccf02b6a841bc9200f957e61 /Doc
parent0ec3477989484943a230e46aaea60cb20c9ef89f (diff)
downloadcpython-bbc9712629c91ba78ffa26531f82e2730acbf395.zip
cpython-bbc9712629c91ba78ffa26531f82e2730acbf395.tar.gz
cpython-bbc9712629c91ba78ffa26531f82e2730acbf395.tar.bz2
Update tutorial/classes.rst to remove references to the old two-argument form of the raise statement.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/tutorial/classes.rst12
1 files changed, 6 insertions, 6 deletions
diff --git a/Doc/tutorial/classes.rst b/Doc/tutorial/classes.rst
index 93e77cc..696860d 100644
--- a/Doc/tutorial/classes.rst
+++ b/Doc/tutorial/classes.rst
@@ -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