From: Stéphane Wirtel Date: Fri, 15 Mar 2019 16:18:36 +0000 (+0000) Subject: Add the meaning of the returned value of PyTypeObject.tp_init (GH-12325) X-Git-Tag: v3.8.0a3~94 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7c4fcb6b05792e94dd5f8aca032f01314248f5ac;p=thirdparty%2FPython%2Fcpython.git Add the meaning of the returned value of PyTypeObject.tp_init (GH-12325) --- diff --git a/Doc/c-api/typeobj.rst b/Doc/c-api/typeobj.rst index 5615f59514b9..f36cfe551e4c 100644 --- a/Doc/c-api/typeobj.rst +++ b/Doc/c-api/typeobj.rst @@ -1558,6 +1558,8 @@ and :c:type:`PyType_Type` effectively act as defaults.) :c:member:`~PyTypeObject.tp_init` function is called; if :c:member:`~PyTypeObject.tp_new` returns an instance of a subtype of the original type, the subtype's :c:member:`~PyTypeObject.tp_init` is called. + Returns ``0`` on success, ``-1`` and sets an exception on error. + **Inheritance:** This field is inherited by subtypes.