[docs] [issue21864] Error in documentation of point 9.8 'Exceptions are classes too'

Josh Rosenberg report at bugs.python.org
Wed Jun 25 02:09:24 CEST 2014

Josh Rosenberg added the comment:

No. The first form, raise Class, is in fact a shorthand for raise Class(). That's the point. You only actually raise instances, but if you pass it a class directly, it instantiates it by calling its constructor with no arguments. The second form is not described explicitly, but the example shows it in use. An instance of an Exception class is explicitly created.

nosy: +josh.rosenberg

Python tracker <report at bugs.python.org>

More information about the docs mailing list