diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-10-16 03:45:45 +0000 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-10-16 03:45:45 +0000 |
commit | 75d40e99d8063ff7b7163e6ccbcf23a44848538b (patch) | |
tree | ed8cf20e4b88b13fde93aa1abe7e8be59015f950 /Python/symtable.c | |
parent | a0097f9441d3b4626a01e5a827a4af80f4e4618b (diff) | |
download | cpython-75d40e99d8063ff7b7163e6ccbcf23a44848538b.tar.gz |
don't identify the toplevel namespace by name #9997
Diffstat (limited to 'Python/symtable.c')
-rw-r--r-- | Python/symtable.c | 2 |
1 files changed, 1 insertions, 1 deletions
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, |