From 5da1f88c10b3076c629a269c45c6944006a4857a Mon Sep 17 00:00:00 2001 From: Alex <637714+alexchandel@users.noreply.github.com> Date: Tue, 19 Nov 2019 01:30:48 -0600 Subject: [PATCH] Fix quoted signature of setattrofunc setattrofunc returns `int`, not `PyObject *`. --- Doc/c-api/typeobj.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/c-api/typeobj.rst b/Doc/c-api/typeobj.rst index b4ffd6b41c6289..7b205c044953b8 100644 --- a/Doc/c-api/typeobj.rst +++ b/Doc/c-api/typeobj.rst @@ -955,7 +955,7 @@ and :c:type:`PyType_Type` effectively act as defaults.) The signature is the same as for :c:func:`PyObject_SetAttr`:: - PyObject *tp_setattro(PyObject *self, PyObject *attr, PyObject *value); + int tp_setattro(PyObject *self, PyObject *attr, PyObject *value); In addition, setting *value* to ``NULL`` to delete an attribute must be supported. It is usually convenient to set this field to