Mercurial > cpython-lru_cache-weakref
diff Python/ceval.c @ 39693:d0b83c4630c0
SF patch 1547796 by Georg Brandl -- set literals.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Mon, 28 Aug 2006 15:27:34 +0000 |
| parents | f87a3e61853d |
| children | c94f37054f19 |
line wrap: on
line diff
--- a/Python/ceval.c Sun Aug 27 01:03:34 2006 +0000 +++ b/Python/ceval.c Mon Aug 28 15:27:34 2006 +0000 @@ -1945,6 +1945,24 @@ } break; + case BUILD_SET: + x = PySet_New(NULL); + if (x != NULL) { + for (; --oparg >= 0;) { + w = POP(); + if (err == 0) + err = PySet_Add(x, w); + Py_DECREF(w); + } + if (err != 0) { + Py_DECREF(x); + break; + } + PUSH(x); + continue; + } + break; + case BUILD_MAP: x = PyDict_New(); PUSH(x);
