summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-01-19 21:57:09 (GMT)
committerGitHub <noreply@github.com>2022-01-19 21:57:09 (GMT)
commitd2b7e08d86874be7d4375a4994617ba8f068a65e (patch)
treec6fb550414370c42cc6dca4674545c92b2947d9d /Objects
parentc4fe0aa670480d887f1f736d1a4251234914b58c (diff)
downloadcpython-d2b7e08d86874be7d4375a4994617ba8f068a65e.zip
cpython-d2b7e08d86874be7d4375a4994617ba8f068a65e.tar.gz
cpython-d2b7e08d86874be7d4375a4994617ba8f068a65e.tar.bz2
docs: correct outdated MappingProxyType docstrings (GH-30281)
The docstrings for MappingProxyType's keys(), values(), and items() methods were never updated to reflect the changes that Python 3 brought to these APIs, namely returning views rather than lists. (cherry picked from commit 2d10fa9bc4cf83c5e5dd73decc9a138d6d247374) Co-authored-by: Joshua Bronson <jabronson@gmail.com>
Diffstat (limited to 'Objects')
-rw-r--r--Objects/descrobject.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/descrobject.c b/Objects/descrobject.c
index 97669be..26726cc 100644
--- a/Objects/descrobject.c
+++ b/Objects/descrobject.c
@@ -1135,11 +1135,11 @@ static PyMethodDef mappingproxy_methods[] = {
PyDoc_STR("D.get(k[,d]) -> D[k] if k in D, else d."
" d defaults to None.")},
{"keys", (PyCFunction)mappingproxy_keys, METH_NOARGS,
- PyDoc_STR("D.keys() -> list of D's keys")},
+ PyDoc_STR("D.keys() -> a set-like object providing a view on D's keys")},
{"values", (PyCFunction)mappingproxy_values, METH_NOARGS,
- PyDoc_STR("D.values() -> list of D's values")},
+ PyDoc_STR("D.values() -> an object providing a view on D's values")},
{"items", (PyCFunction)mappingproxy_items, METH_NOARGS,
- PyDoc_STR("D.items() -> list of D's (key, value) pairs, as 2-tuples")},
+ PyDoc_STR("D.items() -> a set-like object providing a view on D's items")},
{"copy", (PyCFunction)mappingproxy_copy, METH_NOARGS,
PyDoc_STR("D.copy() -> a shallow copy of D")},
{"__class_getitem__", (PyCFunction)Py_GenericAlias, METH_O|METH_CLASS,