diff --git a/Doc/c-api/module.rst b/Doc/c-api/module.rst index 230b471d473be7..bc5fa32ac5acec 100644 --- a/Doc/c-api/module.rst +++ b/Doc/c-api/module.rst @@ -449,10 +449,11 @@ state: Add an object to *module* as *name*. This is a convenience function which can be used from the module's initialization function. - On success, return ``0``. On error, raise an exception and return ``-1``. + On success, return ``0``. - Return ``NULL`` if *value* is ``NULL``. It must be called with an exception - raised in this case. + If *value* is ``NULL`` (indicating failure), raise an exception and return + ``-1``. If an exception is set, raise that exception. If no exception is + set, raise :exc:`SystemError`. Example usage::