SF patch 1547796 by Georg Brandl -- set literals.

This commit is contained in:
Guido van Rossum 2006-08-28 15:27:34 +00:00
parent ecfd0b2f3b
commit 86e58e239e
22 changed files with 229 additions and 72 deletions

View file

@ -1945,6 +1945,24 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
}
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);