bpo-42528: Improve the docs of most Py*_Check{,Exact} API calls (GH-23602)
I think that none of these API calls can fail, but only few of them are
documented as such. Add the sentence "This function always succeeds" (which is
the same already used e.g. by PyNumber_Check) to all of them.
diff --git a/Doc/c-api/weakref.rst b/Doc/c-api/weakref.rst
index 9205ca6..98ebe71 100644
--- a/Doc/c-api/weakref.rst
+++ b/Doc/c-api/weakref.rst
@@ -13,17 +13,18 @@
.. c:function:: int PyWeakref_Check(ob)
- Return true if *ob* is either a reference or proxy object.
+ Return true if *ob* is either a reference or proxy object. This function
+ always succeeds.
.. c:function:: int PyWeakref_CheckRef(ob)
- Return true if *ob* is a reference object.
+ Return true if *ob* is a reference object. This function always succeeds.
.. c:function:: int PyWeakref_CheckProxy(ob)
- Return true if *ob* is a proxy object.
+ Return true if *ob* is a proxy object. This function always succeeds.
.. c:function:: PyObject* PyWeakref_NewRef(PyObject *ob, PyObject *callback)