Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions Doc/c-api/dict.rst
Original file line number Diff line number Diff line change
Expand Up @@ -472,11 +472,13 @@ Dictionary objects

.. c:function:: int PyDict_Update(PyObject *a, PyObject *b)

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.
This is the same as ``PyDict_Merge(a, b, 1)`` in C.

Similar to ``a.update(b)`` in Python except that :c:func:`PyDict_Update`
doesn't not support a sequence of key value pairs as *b* parameter.
Use :c:func:`PyDict_MergeFromSeq2` in this case.

Return ``0`` on success or ``-1`` if an exception was raised.
Comment thread
sobolevn marked this conversation as resolved.
Resolved

.. note::

Expand Down
Loading