Mercurial > cpython-lru_cache-weakref
diff Python/symtable.c @ 65392:fd5c83f76447
don't identify the toplevel namespace by name #9997
| author | Benjamin Peterson <benjamin@python.org> |
|---|---|
| date | Sat, 16 Oct 2010 03:45:45 +0000 |
| parents | 861c35cef7aa |
| children | c5f97b054158 |
line wrap: on
line diff
--- a/Python/symtable.c Sat Oct 16 03:12:39 2010 +0000 +++ b/Python/symtable.c Sat Oct 16 03:45:45 2010 +0000 @@ -924,7 +924,7 @@ 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,
