Update of /cvsroot/python/python/dist/src/Objects In directory usw-pr-cvs1:/tmp/cvs-serv2783 Modified Files: dictobject.c Log Message: dict_update has two boundary conditions: a.update(a) and a.update({}) Added test for second one. Index: dictobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/dictobject.c,v retrieving revision 2.71 retrieving revision 2.72 diff -C2 -r2.71 -r2.72 *** dictobject.c 2000/12/13 23:18:45 2.71 --- dictobject.c 2001/01/03 22:34:59 2.72 *************** *** 810,815 **** if (!PyArg_Parse(args, "O!", &PyDict_Type, &other)) return NULL; ! if (other == mp) ! goto done; /* a.update(a); nothing to do */ /* Do one big resize at the start, rather than incrementally resizing as we insert new items. Expect that there will be --- 810,815 ---- if (!PyArg_Parse(args, "O!", &PyDict_Type, &other)) return NULL; ! if (other == mp || other->ma_used == 0) ! goto done; /* a.update(a) or a.update({}); nothing to do */ /* Do one big resize at the start, rather than incrementally resizing as we insert new items. Expect that there will be
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4