From: Neal Norwitz Date: Fri, 25 Nov 2005 03:14:00 +0000 (+0000) Subject: Get symtable to limp along, can run compiler/symbols.py. Not saying much, needs... X-Git-Tag: v2.5a0~1107 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=21d19f7203f147622dfab9ddcc3efe1e0d71cd70;p=thirdparty%2FPython%2Fcpython.git Get symtable to limp along, can run compiler/symbols.py. Not saying much, needs more work. --- diff --git a/Lib/symtable.py b/Lib/symtable.py index 38042ae96041..3f1332e8ed34 100644 --- a/Lib/symtable.py +++ b/Lib/symtable.py @@ -13,7 +13,10 @@ __all__ = ["symtable", "SymbolTable", "newSymbolTable", "Class", def symtable(code, filename, compile_type): raw = _symtable.symtable(code, filename, compile_type) - return newSymbolTable(raw[0], filename) + for top in raw.itervalues(): + if top.name == 'top': + break + return newSymbolTable(top, filename) class SymbolTableFactory: def __init__(self):