classification
Title: Documentation for PyDict_Update is incorrect
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.3, Python 3.4, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Jill.M, docs@python, ezio.melotti, ncoghlan, python-dev, rhettinger
Priority: normal Keywords: patch

Created on 2013-07-15 02:11 by ncoghlan, last changed 2014-03-25 08:35 by python-dev. This issue is now closed.

Files
File name Uploaded Description Edit
PyDict_Update.patch priyapappachan, 2014-03-25 08:16 Updated PyDict_Update doc review
Messages (4)
msg193070 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2013-07-15 02:11
The docs from PyDict_Update (http://docs.python.org/3/c-api/dict.html#PyDict_Update) claim it is equivalent to the Python level dict.update (http://docs.python.org/3/library/stdtypes#dict.update)

This isn't accurate - unlike dict.update, PyDict_Update doesn't fall back to the iterating over a sequence of key value pairs if the second argument has no "keys" attribute.
msg213116 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2014-03-11 05:04
Nice catch.
msg214788 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-03-25 08:35
New changeset 8e1637e3a099 by Georg Brandl in branch '3.4':
Closes #18456: Doc fix: PyDict_Update only works with dict-like objects, not key-value sequences. Patch by priyapappachan.
http://hg.python.org/cpython/rev/8e1637e3a099
msg214789 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-03-25 08:35
New changeset 2e51845a99e2 by Georg Brandl in branch '2.7':
Closes #18456: Doc fix: PyDict_Update only works with dict-like objects, not key-value sequences. Patch by priyapappachan.
http://hg.python.org/cpython/rev/2e51845a99e2
History
Date User Action Args
2014-03-25 08:35:35python-devsetmessages: + msg214789
2014-03-25 08:35:13python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg214788

resolution: fixed
stage: needs patch -> resolved
2014-03-25 08:16:52priyapappachansetfiles: + PyDict_Update.patch
keywords: + patch
2014-03-11 05:04:03rhettingersetnosy: + rhettinger
messages: + msg213116
2014-03-09 21:15:06Jill.Msetnosy: + Jill.M
2013-08-08 17:49:02ezio.melottisetnosy: + ezio.melotti
2013-07-15 02:11:12ncoghlancreate