mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
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.
This commit is contained in:
parent
d99cd333fe
commit
1538b3d3df
2 changed files with 14 additions and 14 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue