| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -81,14 +81,16 @@ Dictionary Objects | |||
| 81 | 81 | .. c:function:: int PyDict_DelItem(PyObject *p, PyObject *key) | |
| 82 | 82 | ||
| 83 | 83 | Remove the entry in dictionary *p* with key *key*. *key* must be hashable; | |
| 84 | - if it isn't, :exc:`TypeError` is raised. Return ``0`` on success or ``-1`` | ||
| 85 | - on failure. | ||
| 84 | + if it isn't, :exc:`TypeError` is raised. | ||
| 85 | + If *key* is not in the dictionary, :exc:`KeyError` is raised. | ||
| 86 | + Return ``0`` on success or ``-1`` on failure. | ||
| 86 | 87 | ||
| 87 | 88 | ||
| 88 | 89 | .. c:function:: int PyDict_DelItemString(PyObject *p, const char *key) | |
| 89 | 90 | ||
| 90 | - Remove the entry in dictionary *p* which has a key specified by the string | ||
| 91 | - *key*. Return ``0`` on success or ``-1`` on failure. | ||
| 91 | + Remove the entry in dictionary *p* which has a key specified by the string *key*. | ||
| 92 | + If *key* is not in the dictionary, :exc:`KeyError` is raised. | ||
| 93 | + Return ``0`` on success or ``-1`` on failure. | ||
| 92 | 94 | ||
| 93 | 95 | ||
| 94 | 96 | .. c:function:: PyObject* PyDict_GetItem(PyObject *p, PyObject *key) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments