Skip to content

Commit f817431

Browse files
ngoldbaumsobolevn
andauthored
Update module.rst
Co-authored-by: sobolevn <mail@sobolevn.me>
1 parent 7b40979 commit f817431

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Doc/c-api/module.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,10 +1019,10 @@ or code that creates modules dynamically.
10191019
Set the docstring for *module* to *docstring*.
10201020
This function is called automatically when creating a module from
10211021
``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.
1022+
``PyModule_Create``, or ``PyModule_FromDefAndSpec``).
1023+
1024+
Return ``0`` on success.
1025+
Return ``-1`` with an exception set on error.
10261026
10271027
.. versionadded:: 3.5
10281028

0 commit comments

Comments
 (0)