Fix set literals not being visited in symtable creation.

This commit is contained in:
Georg Brandl 2006-08-28 16:38:22 +00:00
parent 86e58e239e
commit 17ab9a02b5
2 changed files with 4 additions and 1 deletions

View File

@ -3043,7 +3043,7 @@ init_ast(void)
if (PyDict_SetItemString(d, "AST", (PyObject*)AST_type) < 0) return;
if (PyModule_AddIntConstant(m, "PyCF_ONLY_AST", PyCF_ONLY_AST) < 0)
return;
if (PyModule_AddStringConstant(m, "__version__", "51600") < 0)
if (PyModule_AddStringConstant(m, "__version__", "51631") < 0)
return;
if (PyDict_SetItemString(d, "mod", (PyObject*)mod_type) < 0) return;
if (PyDict_SetItemString(d, "Module", (PyObject*)Module_type) < 0)

View File

@ -1147,6 +1147,9 @@ symtable_visit_expr(struct symtable *st, expr_ty e)
VISIT_SEQ(st, expr, e->v.Dict.keys);
VISIT_SEQ(st, expr, e->v.Dict.values);
break;
case Set_kind:
VISIT_SEQ(st, expr, e->v.Set.elts);
break;
case ListComp_kind:
if (!symtable_new_tmpname(st))
return 0;