From 230b20684f6d10044d604bc88065692393037948 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 16 Oct 2010 03:45:45 +0000 Subject: don't identify the toplevel namespace by name #9997 --- Python/symtable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/symtable.c') diff --git a/Python/symtable.c b/Python/symtable.c index f75b9c997f..4a6c52335b 100644 --- a/Python/symtable.c +++ b/Python/symtable.c @@ -924,7 +924,7 @@ symtable_enter_block(struct symtable *st, identifier name, _Py_block_ty block, st->st_cur = ste_new(st, name, block, ast, lineno, col_offset); if (st->st_cur == NULL) return 0; - if (name == GET_IDENTIFIER(top)) + if (block == ModuleBlock) st->st_global = st->st_cur->ste_symbols; if (prev) { if (PyList_Append(prev->ste_children, -- cgit v1.2.1