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 7b40979 commit f817431Copy full SHA for f817431
1 file changed
Doc/c-api/module.rst
@@ -1019,10 +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``). 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.
+ ``PyModule_Create``, or ``PyModule_FromDefAndSpec``).
+
+ Return ``0`` on success.
+ Return ``-1`` with an exception set on error.
1026
1027
.. versionadded:: 3.5
1028
0 commit comments