summaryrefslogtreecommitdiff
path: root/Include
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-10-02 11:07:29 +0300
committerSerhiy Storchaka <storchaka@gmail.com>2016-10-02 11:07:29 +0300
commit8438682bb71babd4ebdff8c056a915e652e85ff8 (patch)
tree13fe086a358c989e8c19de6639ee4c0a5b3d2b88 /Include
parent50b528352a3c6cb72d7dd48ad591a4023ffce896 (diff)
parent5ca9d515bdb90ee5588987dd8f8b2b723b21f4c3 (diff)
downloadcpython-8438682bb71babd4ebdff8c056a915e652e85ff8.tar.gz
Issue #27358: Optimized merging var-keyword arguments and improved error
message when pass a non-mapping as a var-keyword argument.
Diffstat (limited to 'Include')
-rw-r--r--Include/dictobject.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Include/dictobject.h b/Include/dictobject.h
index cf0745853e..f06f2409c8 100644
--- a/Include/dictobject.h
+++ b/Include/dictobject.h
@@ -132,6 +132,12 @@ PyAPI_FUNC(int) PyDict_Merge(PyObject *mp,
int override);
#ifndef Py_LIMITED_API
+/* Like PyDict_Merge, but override can be 0, 1 or 2. If override is 0,
+ the first occurrence of a key wins, if override is 1, the last occurrence
+ of a key wins, if override is 2, a KeyError with conflicting key as
+ argument is raised.
+*/
+PyAPI_FUNC(int) _PyDict_MergeEx(PyObject *mp, PyObject *other, int override);
PyAPI_FUNC(PyObject *) _PyDictView_Intersect(PyObject* self, PyObject *other);
#endif