]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-144257: document return values of PyModule_SetDocString (GH-144258)
authorNathan Goldbaum <nathan.goldbaum@gmail.com>
Tue, 27 Jan 2026 07:15:16 +0000 (00:15 -0700)
committerGitHub <noreply@github.com>
Tue, 27 Jan 2026 07:15:16 +0000 (02:15 -0500)
Co-authored-by: sobolevn <mail@sobolevn.me>
Doc/c-api/module.rst

index 431151b841ebb637ae417cd015638e15ca873dff..90f55add56bf522d841da556938b48dfbbf861b9 100644 (file)
@@ -1021,6 +1021,9 @@ or code that creates modules dynamically.
    ``PyModuleDef`` (such as when using :ref:`multi-phase-initialization`,
    ``PyModule_Create``, or ``PyModule_FromDefAndSpec``).
 
+   Return ``0`` on success.
+   Return ``-1`` with an exception set on error.
+
    .. versionadded:: 3.5
 
 .. c:function:: int PyUnstable_Module_SetGIL(PyObject *module, void *gil)