mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-28280: Make PyMapping_Keys(), PyMapping_Values() and PyMapping_Items() always return a list (#3840)
This commit is contained in:
parent
f07e2b64df
commit
0ccc0f6c74
6 changed files with 137 additions and 34 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue