diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-10-02 08:06:43 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-10-02 08:06:43 (GMT) |
commit | e036ef8fa29f27d57fe9f8cef8d931d4122d8223 (patch) | |
tree | b3d48b866f7339d7577f68529326fba4856b821e /Include/dictobject.h | |
parent | 0a3beffc8f6483da16523fceb9158af6a259a608 (diff) | |
download | cpython-e036ef8fa29f27d57fe9f8cef8d931d4122d8223.zip cpython-e036ef8fa29f27d57fe9f8cef8d931d4122d8223.tar.gz cpython-e036ef8fa29f27d57fe9f8cef8d931d4122d8223.tar.bz2 |
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/dictobject.h')
-rw-r--r-- | Include/dictobject.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Include/dictobject.h b/Include/dictobject.h index cf07458..f06f240 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 |