mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
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.
This commit is contained in:
parent
1a9f51ed12
commit
315fc52db1
26 changed files with 74 additions and 52 deletions
|
@ -22,12 +22,14 @@ than explicitly calling :c:func:`PyGen_New` or :c:func:`PyGen_NewWithQualName`.
|
|||
|
||||
.. c:function:: int PyGen_Check(PyObject *ob)
|
||||
|
||||
Return true if *ob* is a generator object; *ob* must not be ``NULL``.
|
||||
Return true if *ob* is a generator object; *ob* must not be ``NULL``. This
|
||||
function always succeeds.
|
||||
|
||||
|
||||
.. c:function:: int PyGen_CheckExact(PyObject *ob)
|
||||
|
||||
Return true if *ob*'s type is :c:type:`PyGen_Type`; *ob* must not be ``NULL``.
|
||||
Return true if *ob*'s type is :c:type:`PyGen_Type`; *ob* must not be
|
||||
``NULL``. This function always succeeds.
|
||||
|
||||
|
||||
.. c:function:: PyObject* PyGen_New(PyFrameObject *frame)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue