diff options
author | Oren Milman <orenmn@gmail.com> | 2017-10-08 11:17:46 +0300 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2017-10-08 11:17:46 +0300 |
commit | 0ccc0f6c7495be9043300e22d8f38e6d65e8884f (patch) | |
tree | 0e93d02086fb4997860e82ca68969a5cfbe24a2f /Doc/c-api | |
parent | f07e2b64df6304a36fb5e29397d3c77a7ba17704 (diff) | |
download | cpython-git-0ccc0f6c7495be9043300e22d8f38e6d65e8884f.tar.gz |
bpo-28280: Make PyMapping_Keys(), PyMapping_Values() and PyMapping_Items() always return a list (#3840)
Diffstat (limited to 'Doc/c-api')
-rw-r--r-- | Doc/c-api/mapping.rst | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/Doc/c-api/mapping.rst b/Doc/c-api/mapping.rst index a71e942837..308a9761f8 100644 --- a/Doc/c-api/mapping.rst +++ b/Doc/c-api/mapping.rst @@ -50,20 +50,29 @@ Mapping Protocol .. c:function:: PyObject* PyMapping_Keys(PyObject *o) - On success, return a list or tuple of the keys in object *o*. On failure, - return *NULL*. + On success, return a list of the keys in object *o*. On failure, return + *NULL*. + + .. versionchanged:: 3.7 + Previously, the function returned a list or a tuple. .. c:function:: PyObject* PyMapping_Values(PyObject *o) - On success, return a list or tuple of the values in object *o*. On failure, - return *NULL*. + On success, return a list of the values in object *o*. On failure, return + *NULL*. + + .. versionchanged:: 3.7 + Previously, the function returned a list or a tuple. .. c:function:: PyObject* PyMapping_Items(PyObject *o) - 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*. + 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*. + + .. versionchanged:: 3.7 + Previously, the function returned a list or a tuple. .. c:function:: PyObject* PyMapping_GetItemString(PyObject *o, const char *key) |