@@ -55,6 +55,15 @@ Dictionary Objects
5555 This is equivalent to the Python expression ``key in p ``.
5656
5757
58+ .. c :function :: int PyDict_ContainsString (PyObject *p, const char *key)
59+
60+ This is the same as :c:func: `PyDict_Contains `, but *key * is specified as a
61+ :c:expr: `const char* ` UTF-8 encoded bytes string, rather than a
62+ :c:expr: `PyObject* `.
63+
64+ .. versionadded :: 3.13
65+
66+
5867.. c :function :: PyObject* PyDict_Copy (PyObject *p)
5968
6069 Return a new dictionary that contains the same key-value pairs as *p *.
@@ -73,7 +82,7 @@ Dictionary Objects
7382 .. index :: single: PyUnicode_FromString()
7483
7584 Insert *val * into the dictionary *p * using *key * as a key. *key * should
76- be a :c:expr: `const char* `. The key object is created using
85+ be a :c:expr: `const char* ` UTF-8 encoded bytes string . The key object is created using
7786 ``PyUnicode_FromString(key) ``. Return ``0 `` on success or ``-1 `` on
7887 failure. This function *does not * steal a reference to *val *.
7988
@@ -88,7 +97,8 @@ Dictionary Objects
8897
8998.. c :function :: int PyDict_DelItemString (PyObject *p, const char *key)
9099
91- Remove the entry in dictionary *p * which has a key specified by the string *key *.
100+ Remove the entry in dictionary *p * which has a key specified by the UTF-8
101+ encoded bytes string *key *.
92102 If *key * is not in the dictionary, :exc: `KeyError ` is raised.
93103 Return ``0 `` on success or ``-1 `` on failure.
94104
@@ -136,7 +146,8 @@ Dictionary Objects
136146.. c :function :: PyObject* PyDict_GetItemString (PyObject *p, const char *key)
137147
138148 This is the same as :c:func: `PyDict_GetItem `, but *key * is specified as a
139- :c:expr: `const char* `, rather than a :c:expr: `PyObject* `.
149+ :c:expr: `const char* ` UTF-8 encoded bytes string, rather than a
150+ :c:expr: `PyObject* `.
140151
141152 .. note ::
142153
@@ -150,7 +161,8 @@ Dictionary Objects
150161.. c :function :: int PyDict_GetItemStringRef (PyObject *p, const char *key, PyObject **result)
151162
152163 Similar than :c:func: `PyDict_GetItemRef `, but *key * is specified as a
153- :c:expr: `const char* `, rather than a :c:expr: `PyObject* `.
164+ :c:expr: `const char* ` UTF-8 encoded bytes string, rather than a
165+ :c:expr: `PyObject* `.
154166
155167 .. versionadded :: 3.13
156168
0 commit comments