[Python-checkins] CVS: python/dist/src/Lib symtable.py,1.1,1.2
Jeremy Hylton
jhylton@users.sourceforge.net
Fri, 23 Mar 2001 07:41:17 -0800
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv15065
Modified Files:
symtable.py
Log Message:
flesh out __all__
remove debugging code in if __debug__:
add get_children() method on SymbolTable
Index: symtable.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/symtable.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** symtable.py 2001/03/22 23:32:22 1.1
--- symtable.py 2001/03/23 15:41:14 1.2
***************
*** 9,13 ****
import weakref
! __all__ = ["symtable", "SymbolTable", "newSymbolTable"]
def symtable(code, filename, compile_type):
--- 9,14 ----
import weakref
! __all__ = ["symtable", "SymbolTable", "newSymbolTable", "Class",
! "Function", "Symbol"]
def symtable(code, filename, compile_type):
***************
*** 118,121 ****
--- 119,126 ----
if st.name == name]
+ def get_children(self):
+ return [newSymbolTable(st, self._filename)
+ for st in self._table.children]
+
class Function(SymbolTable):
***************
*** 237,253 ****
return self.__namespaces[0]
- if __debug__:
- class Foo:
- version = 1
-
- class Foo:
- version = 2
-
- class Foo:
- version = 3
-
- def execfunc(x):
- exec x in y
-
if __name__ == "__main__":
import os, sys
--- 242,245 ----