# Documentation See https://docs.python.org/3.15/c-api/module.html#c.PyModule_SetDocString. It should say it returns -1 on failure and 0 on success. Failure can happen if creating a Python string from the C string docstring fails or if setting the `__doc__` attribute on the module object fails. <!-- gh-linked-prs --> ### Linked PRs * gh-144258 * gh-144263 * gh-144286 <!-- /gh-linked-prs -->