summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-08-28 16:38:22 (GMT)
committerGeorg Brandl <georg@python.org>2006-08-28 16:38:22 (GMT)
commit17ab9a02b53691d9968bcd1fa09560a9ffe3e514 (patch)
tree09f94dc6c492fc0d42f7ecce6237974e052ab501
parent86e58e239e39845e706c4afa392423f0fedcdf39 (diff)
downloadcpython-17ab9a02b53691d9968bcd1fa09560a9ffe3e514.zip
cpython-17ab9a02b53691d9968bcd1fa09560a9ffe3e514.tar.gz
cpython-17ab9a02b53691d9968bcd1fa09560a9ffe3e514.tar.bz2
Fix set literals not being visited in symtable creation.
-rw-r--r--Python/Python-ast.c2
-rw-r--r--Python/symtable.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/Python/Python-ast.c b/Python/Python-ast.c
index 86f09ed..b322039 100644
--- a/Python/Python-ast.c
+++ b/Python/Python-ast.c
@@ -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)
diff --git a/Python/symtable.c b/Python/symtable.c
index bf15960..64eeb53 100644
--- a/Python/symtable.c
+++ b/Python/symtable.c
@@ -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;