bpo-41802: Document 'PyDict_DelItem' can raise a 'KeyError' (GH-22291)
This commit is contained in:
parent
583ee5a5b1
commit
20ce62f009
|
@ -81,14 +81,16 @@ Dictionary Objects
|
||||||
.. c:function:: int PyDict_DelItem(PyObject *p, PyObject *key)
|
.. c:function:: int PyDict_DelItem(PyObject *p, PyObject *key)
|
||||||
|
|
||||||
Remove the entry in dictionary *p* with key *key*. *key* must be hashable;
|
Remove the entry in dictionary *p* with key *key*. *key* must be hashable;
|
||||||
if it isn't, :exc:`TypeError` is raised. Return ``0`` on success or ``-1``
|
if it isn't, :exc:`TypeError` is raised.
|
||||||
on failure.
|
If *key* is not in the dictionary, :exc:`KeyError` is raised.
|
||||||
|
Return ``0`` on success or ``-1`` on failure.
|
||||||
|
|
||||||
|
|
||||||
.. c:function:: int PyDict_DelItemString(PyObject *p, const char *key)
|
.. c:function:: int PyDict_DelItemString(PyObject *p, const char *key)
|
||||||
|
|
||||||
Remove the entry in dictionary *p* which has a key specified by the string
|
Remove the entry in dictionary *p* which has a key specified by the string *key*.
|
||||||
*key*. Return ``0`` on success or ``-1`` on failure.
|
If *key* is not in the dictionary, :exc:`KeyError` is raised.
|
||||||
|
Return ``0`` on success or ``-1`` on failure.
|
||||||
|
|
||||||
|
|
||||||
.. c:function:: PyObject* PyDict_GetItem(PyObject *p, PyObject *key)
|
.. c:function:: PyObject* PyDict_GetItem(PyObject *p, PyObject *key)
|
||||||
|
|
Loading…
Reference in New Issue