diff options
author | Benjamin Peterson <benjamin@python.org> | 2013-10-26 17:13:51 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2013-10-26 17:13:51 (GMT) |
commit | 89d8cd943b25185e8d15b15636531ff84277bdab (patch) | |
tree | b574ba7068250c78a87ae9030e6c83d665630c94 /Lib/symtable.py | |
parent | 050fcd51ccc997596fa9616348f15481d3f110bf (diff) | |
download | cpython-89d8cd943b25185e8d15b15636531ff84277bdab.zip cpython-89d8cd943b25185e8d15b15636531ff84277bdab.tar.gz cpython-89d8cd943b25185e8d15b15636531ff84277bdab.tar.bz2 |
just return toplevel symbol table rather than all blocks (closes #19393)
Diffstat (limited to 'Lib/symtable.py')
-rw-r--r-- | Lib/symtable.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Lib/symtable.py b/Lib/symtable.py index 39c1a80..bb27196 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: |