bpo-35461: Document C API functions which suppress exceptions. (GH-11119)
diff --git a/Doc/c-api/mapping.rst b/Doc/c-api/mapping.rst
index b8eaadb..e37dec9 100644
--- a/Doc/c-api/mapping.rst
+++ b/Doc/c-api/mapping.rst
@@ -60,6 +60,10 @@
This is equivalent to the Python expression ``key in o``.
This function always succeeds.
+ Note that exceptions which occur while calling the :meth:`__getitem__`
+ method will get suppressed.
+ To get error reporting use :c:func:`PyObject_GetItem()` instead.
+
.. c:function:: int PyMapping_HasKeyString(PyObject *o, const char *key)
@@ -67,6 +71,10 @@
This is equivalent to the Python expression ``key in o``.
This function always succeeds.
+ Note that exceptions which occur while calling the :meth:`__getitem__`
+ method and creating a temporary string object will get suppressed.
+ To get error reporting use :c:func:`PyMapping_GetItemString()` instead.
+
.. c:function:: PyObject* PyMapping_Keys(PyObject *o)