(original) (raw)

changeset: 104065:68fc808bed9f branch: 3.5 parent: 104060:216e8b809e4e user: Serhiy Storchaka storchaka@gmail.com date: Mon Sep 26 20:52:41 2016 +0300 files: Doc/c-api/mapping.rst Include/abstract.h description: Issues #25909, #28211: Restored correct documentation of PyMapping_Items, PyMapping_Keys and PyMapping_Values. Based on patch by Xiang Zhang. diff -r 216e8b809e4e -r 68fc808bed9f Doc/c-api/mapping.rst --- a/Doc/c-api/mapping.rst Sun Sep 25 20:36:23 2016 +0300 +++ b/Doc/c-api/mapping.rst Mon Sep 26 20:52:41 2016 +0300 @@ -50,21 +50,20 @@ .. 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 -r 216e8b809e4e -r 68fc808bed9f Include/abstract.h --- a/Include/abstract.h Sun Sep 25 20:36:23 2016 +0300 +++ b/Include/abstract.h Mon Sep 26 20:52:41 2016 +0300 @@ -1216,23 +1216,23 @@ 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. */ /storchaka@gmail.com