This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Wrong return value type in the doc of PyMapping_Keys/Values/Items
Type: behavior Stage: resolved
Components: Documentation Versions: Python 3.7, Python 3.6, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, martin.panter, mine0901, orsenthil, python-dev, r.david.murray, serhiy.storchaka, xiang.zhang
Priority: normal Keywords: patch

Created on 2016-09-20 08:57 by xiang.zhang, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
mapping_doc.patch xiang.zhang, 2016-09-20 08:57 review
Messages (4)
msg277018 - (view) Author: Xiang Zhang (xiang.zhang) * (Python committer) Date: 2016-09-20 08:57
PyMapping_Keys/Values/Items can only return a list or tuple. Even in the case of a dict, it returns a list. But the doc tells a dictionary view will be returned in case of dict, which is wrong.
msg277021 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-09-20 10:30
Hmm, the documentation was changed in issue25909, but seems I was wrong. Since PyDict_Items() returns a list, but not a dict view, PyMapping_Items() can return only a list or a tuple.
msg277440 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-09-26 17:54
New changeset 68fc808bed9f by Serhiy Storchaka in branch '3.5':
Issues #25909, #28211: Restored correct documentation of PyMapping_Items,
https://hg.python.org/cpython/rev/68fc808bed9f

New changeset 21336392a680 by Serhiy Storchaka in branch '3.6':
Issues #25909, #28211: Restored correct documentation of PyMapping_Items,
https://hg.python.org/cpython/rev/21336392a680

New changeset 1229de1ab5c8 by Serhiy Storchaka in branch 'default':
Issues #25909, #28211: Restored correct documentation of PyMapping_Items,
https://hg.python.org/cpython/rev/1229de1ab5c8
msg277441 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-09-26 17:56
Thank you for your report and patch Xiang Zhang!
History
Date User Action Args
2022-04-11 14:58:37adminsetgithub: 72398
2016-09-26 17:56:23serhiy.storchakasetstatus: open -> closed
type: behavior
messages: + msg277441

resolution: fixed
stage: patch review -> resolved
2016-09-26 17:54:51python-devsetmessages: + msg277440
2016-09-20 10:30:37serhiy.storchakasetnosy: + orsenthil, r.david.murray, python-dev, martin.panter, serhiy.storchaka, mine0901
messages: + msg277021
2016-09-20 08:57:26xiang.zhangcreate