File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -586,16 +586,16 @@ Exceptions Are Classes Too
586586User-defined exceptions are identified by classes as well. Using this mechanism
587587it is possible to create extensible hierarchies of exceptions.
588588
589- There are two new valid (semantic) forms for the raise statement::
589+ There are two valid (semantic) forms for the raise statement::
590590
591- raise Class, instance
591+ raise Class
592592
593- raise instance
593+ raise Instance
594594
595- In the first form, ``instance `` must be an instance of :class: `Class ` or of a
596- class derived from it. The second form is a shorthand for::
595+ In the first form, ``Class `` must be an instance of :class: `type ` or of a
596+ class derived from it. The first form is a shorthand for::
597597
598- raise instance.__class__, instance
598+ raise Class()
599599
600600A class in an except clause is compatible with an exception if it is the same
601601class or a base class thereof (but not the other way around --- an except clause
You can’t perform that action at this time.
0 commit comments