summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/dict.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-03-25 08:34:30 (GMT)
committerGeorg Brandl <georg@python.org>2014-03-25 08:34:30 (GMT)
commitfbd2db50054a85ec0594dd4f4e78443a18e759e0 (patch)
treeca02406a2c6aecf895461abe38886a23039fbd3c /Doc/c-api/dict.rst
parentdd48b902bb44022e69af766eebbb468068f5e5e1 (diff)
downloadcpython-fbd2db50054a85ec0594dd4f4e78443a18e759e0.zip
cpython-fbd2db50054a85ec0594dd4f4e78443a18e759e0.tar.gz
cpython-fbd2db50054a85ec0594dd4f4e78443a18e759e0.tar.bz2
Closes #18456: Doc fix: PyDict_Update only works with dict-like objects, not key-value sequences. Patch by priyapappachan.
Diffstat (limited to 'Doc/c-api/dict.rst')
-rw-r--r--Doc/c-api/dict.rst7
1 files changed, 5 insertions, 2 deletions
diff --git a/Doc/c-api/dict.rst b/Doc/c-api/dict.rst
index 3e967bd..3006b6c 100644
--- a/Doc/c-api/dict.rst
+++ b/Doc/c-api/dict.rst
@@ -210,8 +210,11 @@ Dictionary Objects
.. c:function:: int PyDict_Update(PyObject *a, PyObject *b)
- This is the same as ``PyDict_Merge(a, b, 1)`` in C, or ``a.update(b)`` in
- Python. Return ``0`` on success or ``-1`` if an exception was raised.
+ This is the same as ``PyDict_Merge(a, b, 1)`` in C, and is similar to
+ ``a.update(b)`` in Python except that :c:func:`PyDict_Update` doesn't fall
+ back to the iterating over a sequence of key value pairs if the second
+ argument has no "keys" attribute. Return ``0`` on success or ``-1`` if an
+ exception was raised.
.. versionadded:: 2.2