Skip to content

Commit 7bf86c7

Browse files
committed
Clarify behavior for modules.
1 parent ed05eba commit 7bf86c7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Doc/c-api/structures.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,8 +559,9 @@ definition with the same method name.
559559
.. c:function:: PyObject *PyCFunction_GetSelf(PyObject *func)
560560
561561
Get the "self" object on *func*. This is the object that would be passed
562-
to the first argument of a :c:type:`PyCFunction`. In modules, this is the
563-
module object.
562+
to the first argument of a :c:type:`PyCFunction`. For C function objects
563+
created through a :c:type:`PyMethodDef` on a :c:type:`PyModuleDef`, this
564+
is the resulting module object.
564565
565566
If *func* is not a C function object, this fails with a
566567
:class:`SystemError`.

0 commit comments

Comments
 (0)