We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7febbe6 commit 7b40979Copy full SHA for 7b40979
Doc/c-api/module.rst
@@ -1019,7 +1019,10 @@ or code that creates modules dynamically.
1019
Set the docstring for *module* to *docstring*.
1020
This function is called automatically when creating a module from
1021
``PyModuleDef`` (such as when using :ref:`multi-phase-initialization`,
1022
- ``PyModule_Create``, or ``PyModule_FromDefAndSpec``).
+ ``PyModule_Create``, or ``PyModule_FromDefAndSpec``). Returns ``0`` on
1023
+ success and ``-1`` on failure. Failure can happen if creating a Python string
1024
+ from *docstring* fails or if setting the ``__doc__`` attribute on *module*
1025
+ fails.
1026
1027
.. versionadded:: 3.5
1028
0 commit comments