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 | 657d06b13eb42dc300436cd1e1788c421a5ada9f (patch) | |
tree | 2b7176c3371978438299c767f9b4bff9ef152834 /Lib/symtable.py | |
parent | 70f213ab11dd44c28af0a8b70259f0e87647c245 (diff) | |
download | cpython-657d06b13eb42dc300436cd1e1788c421a5ada9f.zip cpython-657d06b13eb42dc300436cd1e1788c421a5ada9f.tar.gz cpython-657d06b13eb42dc300436cd1e1788c421a5ada9f.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 ca73f58..0ba9d1a 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.itervalues(): - if top.name == 'top': - break + top = _symtable.symtable(code, filename, compile_type) return _newSymbolTable(top, filename) class SymbolTableFactory: |