diff --git a/Doc/c-api/mapping.rst b/Doc/c-api/mapping.rst index fe601b605b1..a71e9428377 100644 --- a/Doc/c-api/mapping.rst +++ b/Doc/c-api/mapping.rst @@ -50,21 +50,20 @@ Mapping Protocol .. c:function:: PyObject* PyMapping_Keys(PyObject *o) - On success, return a list, a tuple or a dictionary view in case of a dict, - of the keys in object *o*. On failure, return *NULL*. + On success, return a list or tuple of the keys in object *o*. On failure, + return *NULL*. .. c:function:: PyObject* PyMapping_Values(PyObject *o) - On success, return a list, a tuple or a dictionary view in case of a dict, of - the values in object *o*. On failure, return *NULL*. + On success, return a list or tuple of the values in object *o*. On failure, + return *NULL*. .. c:function:: PyObject* PyMapping_Items(PyObject *o) - On success, return a list, a tuple or a dictionary view in case of a dict, of - the items in object *o*, where each item is a tuple containing a key-value - pair. On failure, return *NULL*. + On success, return a list or tuple of the items in object *o*, where each item + is a tuple containing a key-value pair. On failure, return *NULL*. .. c:function:: PyObject* PyMapping_GetItemString(PyObject *o, const char *key) diff --git a/Include/abstract.h b/Include/abstract.h index 3e8ca1f48e8..44107a8a81d 100644 --- a/Include/abstract.h +++ b/Include/abstract.h @@ -1302,23 +1302,23 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/ PyAPI_FUNC(PyObject *) PyMapping_Keys(PyObject *o); /* - On success, return a list, a tuple or a dictionary view in case of a dict, - of the keys in object o. On failure, return NULL. + On success, return a list or tuple of the keys in object o. + On failure, return NULL. */ PyAPI_FUNC(PyObject *) PyMapping_Values(PyObject *o); /* - On success, return a list, a tuple or a dictionary view in case of a dict, - of the values in object o. On failure, return NULL. + On success, return a list or tuple of the values in object o. + On failure, return NULL. */ PyAPI_FUNC(PyObject *) PyMapping_Items(PyObject *o); /* - On success, return a list, a tuple or a dictionary view in case of a dict, - of the items in object o, where each item is a tuple containing a key-value - pair. On failure, return NULL. + On success, return a list or tuple of the items in object o, + where each item is a tuple containing a key-value pair. + On failure, return NULL. */