diff options
Diffstat (limited to 'Doc/c-api/mapping.rst')
-rw-r--r-- | Doc/c-api/mapping.rst | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Doc/c-api/mapping.rst b/Doc/c-api/mapping.rst index 2005ce56f9..cff0759b78 100644 --- a/Doc/c-api/mapping.rst +++ b/Doc/c-api/mapping.rst @@ -36,15 +36,15 @@ Mapping Protocol .. cfunction:: int PyMapping_HasKeyString(PyObject *o, char *key) On success, return ``1`` if the mapping object has the key *key* and ``0`` - otherwise. This is equivalent to the Python expression ``o.has_key(key)``. - This function always succeeds. + otherwise. This is equivalent to ``o[key]``, returning ``True`` on success + and ``False`` on an exception. This function always succeeds. .. cfunction:: int PyMapping_HasKey(PyObject *o, PyObject *key) - Return ``1`` if the mapping object has the key *key* and ``0`` otherwise. This - is equivalent to the Python expression ``o.has_key(key)``. This function always - succeeds. + Return ``1`` if the mapping object has the key *key* and ``0`` otherwise. + This is equivalent to ``o[key]``, returning ``True`` on success and ``False`` + on an exception. This function always succeeds. .. cfunction:: PyObject* PyMapping_Keys(PyObject *o) |