summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-09-26 17:52:41 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-09-26 17:52:41 (GMT)
commit1d480bea9c951af9c317b699c4a420990f401918 (patch)
tree4d0d07f39e46c1e1390cf0b458771820b044c3c1
parentb02f8fc3afe6a8632f8898b990615e51244e23af (diff)
downloadcpython-1d480bea9c951af9c317b699c4a420990f401918.zip
cpython-1d480bea9c951af9c317b699c4a420990f401918.tar.gz
cpython-1d480bea9c951af9c317b699c4a420990f401918.tar.bz2
Issues #25909, #28211: Restored correct documentation of PyMapping_Items,
PyMapping_Keys and PyMapping_Values. Based on patch by Xiang Zhang.
-rw-r--r--Doc/c-api/mapping.rst13
-rw-r--r--Include/abstract.h14
2 files changed, 13 insertions, 14 deletions
diff --git a/Doc/c-api/mapping.rst b/Doc/c-api/mapping.rst
index fe601b6..a71e942 100644
--- a/Doc/c-api/mapping.rst
+++ b/Doc/c-api/mapping.rst
@@ -50,21 +50,20 @@ Mapping Protocol
.. 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 --git a/Include/abstract.h b/Include/abstract.h
index 438610b..36df5a7 100644
--- a/Include/abstract.h
+++ b/Include/abstract.h
@@ -1216,23 +1216,23 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/
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.
*/