[Python-checkins] commit of r41535 - python/trunk/Lib

neal.norwitz@python.org neal.norwitz at python.org
Fri Nov 25 04:14:05 CET 2005


Author: neal.norwitz
Date: Fri Nov 25 04:14:00 2005
New Revision: 41535

Modified:
   python/trunk/Lib/symtable.py
Log:
Get symtable to limp along, can run compiler/symbols.py.  Not saying much, needs more work.

Modified: python/trunk/Lib/symtable.py
==============================================================================
--- python/trunk/Lib/symtable.py	(original)
+++ python/trunk/Lib/symtable.py	Fri Nov 25 04:14:00 2005
@@ -13,7 +13,10 @@
 
 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):


More information about the Python-checkins mailing list