diff options
author | Senthil Kumaran <senthil@uthcode.com> | 2016-01-21 17:38:02 (GMT) |
---|---|---|
committer | Senthil Kumaran <senthil@uthcode.com> | 2016-01-21 17:38:02 (GMT) |
commit | dce4ae8ffe3979798901bc5d5f944e47b7e0ba3a (patch) | |
tree | c0e6b43c86ecdf278c4eda23be41a5aeec39d07f /Doc/c-api | |
parent | 9f7893955298a5691ee9d9c65d98bfc7d1eb34f5 (diff) | |
parent | 1538b3d3dfff284c8976f19c5e475b99717bacd8 (diff) | |
download | cpython-dce4ae8ffe3979798901bc5d5f944e47b7e0ba3a.zip cpython-dce4ae8ffe3979798901bc5d5f944e47b7e0ba3a.tar.gz cpython-dce4ae8ffe3979798901bc5d5f944e47b7e0ba3a.tar.bz2 |
merge from 3.5
issue25909 - Correct the documentation of PyMapping_Items, PyMapping_Keys and
PyMapping_Values in Include/abstract.h and Doc/c-api/mapping.rst.
Patch contributed by Sonali Gupta.
Diffstat (limited to 'Doc/c-api')
-rw-r--r-- | Doc/c-api/mapping.rst | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Doc/c-api/mapping.rst b/Doc/c-api/mapping.rst index e341047..fe601b6 100644 --- a/Doc/c-api/mapping.rst +++ b/Doc/c-api/mapping.rst @@ -50,21 +50,21 @@ Mapping Protocol .. c:function:: PyObject* PyMapping_Keys(PyObject *o) - On success, return a list of the keys in object *o*. On failure, return *NULL*. - This is equivalent to the Python expression ``list(o.keys())``. + 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*. .. c:function:: PyObject* PyMapping_Values(PyObject *o) - On success, return a list of the values in object *o*. On failure, return - *NULL*. This is equivalent to the Python expression ``list(o.values())``. + 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*. .. c:function:: PyObject* PyMapping_Items(PyObject *o) - On success, return a list of the items in object *o*, where each item is a tuple - containing a key-value pair. On failure, return *NULL*. This is equivalent to - the Python expression ``list(o.items())``. + 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*. .. c:function:: PyObject* PyMapping_GetItemString(PyObject *o, const char *key) |