[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>
<http://bugs.python.org/issue21864>
_______________________________________


More information about the Python-bugs-list mailing list