Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Doc/c-api/module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,8 @@ state:

On success, return ``0``. On error, raise an exception and return ``-1``.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep this general statement. There are many cases where the function can fail. For example, if mod is not a module or has no dictionary. PyDict_SetItemString() can fail with MemoryError, etc.


Return ``NULL`` if *value* is ``NULL``. It must be called with an exception
raised in this case.
Return ``-1`` if *value* is ``NULL``. In this case, the function raises an
exception if called without an exception raised.

Example usage::

Expand Down