[3.12] gh-127954: Document PyObject_DelItemString (GH-127986) (#128497)
https://github.com/python/cpython/commit/e1a20910dc6857df558bb9fb7e49c75405b... commit: e1a20910dc6857df558bb9fb7e49c75405b09f06 branch: 3.12 author: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> committer: erlend-aasland <erlend.aasland@protonmail.com> date: 2025-01-04T20:54:56Z summary: [3.12] gh-127954: Document PyObject_DelItemString (GH-127986) (#128497) (cherry picked from commit 8ade15343d5daec3bf79ff7c47f03726fb2bcadf) Co-authored-by: RUANG (James Roy) <rruuaanng@outlook.com> files: M Doc/c-api/object.rst diff --git a/Doc/c-api/object.rst b/Doc/c-api/object.rst index cefd384fd35a1f..b7f1a54972e587 100644 --- a/Doc/c-api/object.rst +++ b/Doc/c-api/object.rst @@ -393,6 +393,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
participants (1)
-
erlend-aasland