Add PyDict_Merge(a, b, override):

PyDict_Merge(a, b, 1) is the same as PyDict_Update(a, b).
PyDict_Merge(a, b, 0) does something similar but leaves existing items
unchanged.
This commit is contained in:
Guido van Rossum 2001-08-10 20:28:28 +00:00
parent f4aa684132
commit 05ac6de2d5
2 changed files with 19 additions and 2 deletions

View file

@ -98,6 +98,7 @@ extern DL_IMPORT(PyObject *) PyDict_Items(PyObject *mp);
extern DL_IMPORT(int) PyDict_Size(PyObject *mp);
extern DL_IMPORT(PyObject *) PyDict_Copy(PyObject *mp);
extern DL_IMPORT(int) PyDict_Update(PyObject *mp, PyObject *other);
extern DL_IMPORT(int) PyDict_Merge(PyObject *mp, PyObject *other, int override);
extern DL_IMPORT(PyObject *) PyDict_GetItemString(PyObject *dp, char *key);