pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/python/cpython/commit/54feddae8832f24f1ca8ebd1f21a19d6aec4b3fd

/> docs: correct outdated MappingProxyType docstrings (GH-30281) · python/cpython@54fedda · GitHub
Skip to content

Commit 54fedda

Browse files
miss-islingtonjab
andauthored
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 2d10fa9) Co-authored-by: Joshua Bronson <jabronson@gmail.com>
1 parent 0064516 commit 54fedda

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Objects/descrobject.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,11 +1134,11 @@ static PyMethodDef mappingproxy_methods[] = {
11341134
PyDoc_STR("D.get(k[,d]) -> D[k] if k in D, else d."
11351135
" d defaults to None.")},
11361136
{"keys", (PyCFunction)mappingproxy_keys, METH_NOARGS,
1137-
PyDoc_STR("D.keys() -> list of D's keys")},
1137+
PyDoc_STR("D.keys() -> a set-like object providing a view on D's keys")},
11381138
{"values", (PyCFunction)mappingproxy_values, METH_NOARGS,
1139-
PyDoc_STR("D.values() -> list of D's values")},
1139+
PyDoc_STR("D.values() -> an object providing a view on D's values")},
11401140
{"items", (PyCFunction)mappingproxy_items, METH_NOARGS,
1141-
PyDoc_STR("D.items() -> list of D's (key, value) pairs, as 2-tuples")},
1141+
PyDoc_STR("D.items() -> a set-like object providing a view on D's items")},
11421142
{"copy", (PyCFunction)mappingproxy_copy, METH_NOARGS,
11431143
PyDoc_STR("D.copy() -> a shallow copy of D")},
11441144
{"__class_getitem__", (PyCFunction)Py_GenericAlias, METH_O|METH_CLASS,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy