mirror of https://github.com/python/cpython
Exception isn't the root of all exception classes anymore.
This commit is contained in:
parent
04f031d202
commit
e001816dff
|
@ -336,8 +336,9 @@ for each thread.
|
||||||
The \var{name} argument must be the name of the new exception, a C
|
The \var{name} argument must be the name of the new exception, a C
|
||||||
string of the form \code{module.class}. The \var{base} and
|
string of the form \code{module.class}. The \var{base} and
|
||||||
\var{dict} arguments are normally \NULL. This creates a class
|
\var{dict} arguments are normally \NULL. This creates a class
|
||||||
object derived from the root for all exceptions, the built-in name
|
object derived from \exception{Exception} (accessible in C as
|
||||||
\exception{Exception} (accessible in C as \cdata{PyExc_Exception}).
|
\cdata{PyExc_Exception}).
|
||||||
|
|
||||||
The \member{__module__} attribute of the new class is set to the
|
The \member{__module__} attribute of the new class is set to the
|
||||||
first part (up to the last dot) of the \var{name} argument, and the
|
first part (up to the last dot) of the \var{name} argument, and the
|
||||||
class name is set to the last part (after the last dot). The
|
class name is set to the last part (after the last dot). The
|
||||||
|
|
Loading…
Reference in New Issue