summaryrefslogtreecommitdiffstats
path: root/Doc/c-api
diff options
context:
space:
mode:
authorStéphane Wirtel <stephane@wirtel.be>2019-03-15 16:18:36 (GMT)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-03-15 16:18:36 (GMT)
commit7c4fcb6b05792e94dd5f8aca032f01314248f5ac (patch)
treeb2681631ff3c673f7fce346f1376a81c1f352b80 /Doc/c-api
parente3f4070aee6f2d489416fdcafd51d6b04d661919 (diff)
downloadcpython-7c4fcb6b05792e94dd5f8aca032f01314248f5ac.zip
cpython-7c4fcb6b05792e94dd5f8aca032f01314248f5ac.tar.gz
cpython-7c4fcb6b05792e94dd5f8aca032f01314248f5ac.tar.bz2
Add the meaning of the returned value of PyTypeObject.tp_init (GH-12325)
Diffstat (limited to 'Doc/c-api')
-rw-r--r--Doc/c-api/typeobj.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/Doc/c-api/typeobj.rst b/Doc/c-api/typeobj.rst
index 5615f59..f36cfe5 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.