We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fdc2ce5 commit c98f517Copy full SHA for c98f517
Doc/c-api/module.rst
@@ -523,9 +523,6 @@ state:
523
524
On success, return ``0``. On error, raise an exception and return ``-1``.
525
526
- Return ``-1`` if *value* is ``NULL``. It must be called with an exception
527
- raised in this case.
528
-
529
Example usage::
530
531
static int
@@ -540,6 +537,10 @@ state:
540
537
return res;
541
538
}
542
539
+ To be convenient, the function accepts ``NULL`` *value* with an exception
+ set. In this case, return ``-1`` and just leave the raised exception
+ unchanged.
543
+
544
The example can also be written without checking explicitly if *obj* is
545
``NULL``::
546
0 commit comments