summaryrefslogtreecommitdiff
path: root/Lib/symtable.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2013-10-26 13:13:51 -0400
committerBenjamin Peterson <benjamin@python.org>2013-10-26 13:13:51 -0400
commit89d8cd943b25185e8d15b15636531ff84277bdab (patch)
treeb574ba7068250c78a87ae9030e6c83d665630c94 /Lib/symtable.py
parent050fcd51ccc997596fa9616348f15481d3f110bf (diff)
downloadcpython-git-89d8cd943b25185e8d15b15636531ff84277bdab.tar.gz
just return toplevel symbol table rather than all blocks (closes #19393)
Diffstat (limited to 'Lib/symtable.py')
-rw-r--r--Lib/symtable.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/Lib/symtable.py b/Lib/symtable.py
index 39c1a8014f..bb271968a4 100644
--- a/Lib/symtable.py
+++ b/Lib/symtable.py
@@ -10,10 +10,7 @@ import weakref
__all__ = ["symtable", "SymbolTable", "Class", "Function", "Symbol"]
def symtable(code, filename, compile_type):
- raw = _symtable.symtable(code, filename, compile_type)
- for top in raw.values():
- if top.name == 'top':
- break
+ top = _symtable.symtable(code, filename, compile_type)
return _newSymbolTable(top, filename)
class SymbolTableFactory: