[issue18456] Documentation for PyDict_Update is incorrect
New submission from Nick Coghlan: 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. ---------- assignee: docs@python components: Documentation messages: 193070 nosy: docs@python, ncoghlan priority: normal severity: normal stage: needs patch status: open title: Documentation for PyDict_Update is incorrect type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue18456> _______________________________________
Changes by Ezio Melotti <ezio.melotti@gmail.com>: ---------- nosy: +ezio.melotti _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue18456> _______________________________________
Changes by Jill M <jillian.munson@gmail.com>: ---------- nosy: +Jill.M _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue18456> _______________________________________
Raymond Hettinger added the comment: Nice catch. ---------- nosy: +rhettinger _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue18456> _______________________________________
Changes by priya <priyapappachan010@gmail.com>: ---------- keywords: +patch Added file: http://bugs.python.org/file34610/PyDict_Update.patch _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue18456> _______________________________________
Roundup Robot added the comment: 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 ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue18456> _______________________________________
Roundup Robot added the comment: 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 ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue18456> _______________________________________
participants (6)
-
Ezio Melotti
-
Jill M
-
Nick Coghlan
-
priya
-
Raymond Hettinger
-
Roundup Robot