symtable
index
/usr/lib/python2.2/symtable.py

Interface to the compiler's internal symbol tables

 
Modules
            
_symtable
weakref
 
Classes
            
Symbol
SymbolTable
Class
Function
SymbolTableFactory
 
class Class(SymbolTable)
       
   Methods defined here:
get_methods(self)

Data and non-method functions defined here:
_Class__methods = None
__doc__ = None
__module__ = 'symtable'

Methods inherited from SymbolTable:
_SymbolTable__check_children = __check_children(self, name)
__init__(self, raw_table, filename)
__repr__(self)
get_children(self)
get_id(self)
get_identifiers(self)
get_lineno(self)
get_name(self)
get_symbols(self)
get_type(self)
has_children(self)
has_exec(self)
Return true if the scope uses exec
has_import_star(self)
Return true if the scope uses import *
is_nested(self)
is_optimized(self)
lookup(self, name)
 
class Function(SymbolTable)
       
   Methods defined here:
_Function__idents_matching = __idents_matching(self, test_func)
get_frees(self)
get_globals(self)
get_locals(self)
get_parameters(self)

Data and non-method functions defined here:
_Function__frees = None
_Function__globals = None
_Function__locals = None
_Function__params = None
__doc__ = None
__module__ = 'symtable'

Methods inherited from SymbolTable:
_SymbolTable__check_children = __check_children(self, name)
__init__(self, raw_table, filename)
__repr__(self)
get_children(self)
get_id(self)
get_identifiers(self)
get_lineno(self)
get_name(self)
get_symbols(self)
get_type(self)
has_children(self)
has_exec(self)
Return true if the scope uses exec
has_import_star(self)
Return true if the scope uses import *
is_nested(self)
is_optimized(self)
lookup(self, name)
 
class Symbol
       
   Methods defined here:
__init__(self, name, flags, namespaces=None)
__repr__(self)
get_name(self)
get_namespace(self)
Returns the single namespace bound to this name.
 
Raises ValueError if the name is bound to multiple namespaces.
get_namespaces(self)
Return a list of namespaces bound to this name
is_assigned(self)
is_free(self)
is_global(self)
is_imported(self)
is_in_tuple(self)
is_keywordarg(self)
is_local(self)
is_namespace(self)
Returns true if name binding introduces new namespace.
 
If the name is used as the target of a function or class
statement, this will be true.
 
Note that a single name can be bound to multiple objects.  If
is_namespace() is true, the name may also be bound to other
objects, like an int or list, that does not introduce a new
namespace.
is_parameter(self)
is_referenced(self)
is_vararg(self)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'symtable'
 
class SymbolTable
       
   Methods defined here:
_SymbolTable__check_children = __check_children(self, name)
__init__(self, raw_table, filename)
__repr__(self)
get_children(self)
get_id(self)
get_identifiers(self)
get_lineno(self)
get_name(self)
get_symbols(self)
get_type(self)
has_children(self)
has_exec(self)
Return true if the scope uses exec
has_import_star(self)
Return true if the scope uses import *
is_nested(self)
is_optimized(self)
lookup(self, name)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'symtable'
 
class SymbolTableFactory
       
   Methods defined here:
__call__(self, table, filename)
__init__(self)
new(self, table, filename)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'symtable'
 
Functions
            
bool(x)
Helper to force boolean result to 1 or 0
is_free(flags)
symtable(code, filename, compile_type)
 
Data
             DEF_BOUND = 1030
DEF_DOUBLESTAR = 32
DEF_FREE = 128
DEF_FREE_CLASS = 512
DEF_FREE_GLOBAL = 256
DEF_GLOBAL = 1
DEF_IMPORT = 1024
DEF_INTUPLE = 64
DEF_LOCAL = 2
DEF_PARAM = 4
DEF_STAR = 16
OPT_BARE_EXEC = 4
OPT_EXEC = 2
OPT_IMPORT_STAR = 1
USE = 8
__all__ = ['symtable', 'SymbolTable', 'newSymbolTable', 'Class', 'Function', 'Symbol']
__file__ = '/usr/lib/python2.2/symtable.pyc'
__name__ = 'symtable'
newSymbolTable = <symtable.SymbolTableFactory instance>