From 8dd4be1e73ed7ecf6a538b887d7ba56b1b5b5fc2 Mon Sep 17 00:00:00 2001 From: RUANG Date: Mon, 16 Dec 2024 20:46:08 +0800 Subject: [PATCH] Add PyObject_DelItemString function documentation. --- Doc/c-api/object.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Doc/c-api/object.rst b/Doc/c-api/object.rst index 2ac975ff7d1a59..7bc01a32c44118 100644 --- a/Doc/c-api/object.rst +++ b/Doc/c-api/object.rst @@ -492,6 +492,13 @@ Object Protocol on failure. This is equivalent to the Python statement ``del o[key]``. +.. c:function:: int PyObject_DelItemString(PyObject *o, const char *key) + + This is the same as :c:func:`PyObject_DelItem`, but *key* is + specified as a :c:expr:`const char*` UTF-8 encoded bytes string, + rather than a :c:expr:`PyObject*`. + + .. c:function:: PyObject* PyObject_Dir(PyObject *o) This is equivalent to the Python expression ``dir(o)``, returning a (possibly