Renamed dict.absorb() (too spungy) to dict.update().

This commit is contained in:
Guido van Rossum 1997-06-02 17:13:37 +00:00
parent c22eb01bfe
commit a8d5131d57

View File

@ -675,7 +675,7 @@ dict_items(mp, args)
} }
static PyObject * static PyObject *
dict_absorb(mp, args) dict_update(mp, args)
register dictobject *mp; register dictobject *mp;
PyObject *args; PyObject *args;
{ {
@ -685,7 +685,7 @@ dict_absorb(mp, args)
if (!PyArg_Parse(args, "O!", &PyDict_Type, &other)) if (!PyArg_Parse(args, "O!", &PyDict_Type, &other))
return NULL; return NULL;
if (other == mp) if (other == mp)
goto done; /* a.absorb(a); nothing to do */ goto done; /* a.update(a); nothing to do */
/* Do one big resize at the start, rather than incrementally /* Do one big resize at the start, rather than incrementally
resizing as we insert new items. Expect that there will be resizing as we insert new items. Expect that there will be
no (or few) overlapping keys. */ no (or few) overlapping keys. */
@ -963,7 +963,7 @@ dict_clear(mp, args)
} }
static PyMethodDef mapp_methods[] = { static PyMethodDef mapp_methods[] = {
{"absorb", (PyCFunction)dict_absorb}, {"update", (PyCFunction)dict_update},
{"clear", (PyCFunction)dict_clear}, {"clear", (PyCFunction)dict_clear},
{"copy", (PyCFunction)dict_copy}, {"copy", (PyCFunction)dict_copy},
{"has_key", (PyCFunction)dict_has_key}, {"has_key", (PyCFunction)dict_has_key},