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

Interface to the compiler's internal symbol tables

 
Modules
            
_symtable
weakref

 
Classes
            
Symbol
SymbolTable
Class
Function
SymbolTableFactory

 
class Class(SymbolTable)
       
  
_SymbolTable__check_children = __check_children(self, name) from SymbolTable
__init__(self, raw_table, filename) from SymbolTable
__repr__(self) from SymbolTable
get_children(self) from SymbolTable
get_id(self) from SymbolTable
get_identifiers(self) from SymbolTable
get_lineno(self) from SymbolTable
get_methods(self)
get_name(self) from SymbolTable
get_symbols(self) from SymbolTable
get_type(self) from SymbolTable
has_children(self) from SymbolTable
has_exec(self) from SymbolTable
has_import_star(self) from SymbolTable
is_nested(self) from SymbolTable
is_optimized(self) from SymbolTable
lookup(self, name) from SymbolTable

 
class Function(SymbolTable)
       
  
_Function__idents_matching = __idents_matching(self, test_func)
_SymbolTable__check_children = __check_children(self, name) from SymbolTable
__init__(self, raw_table, filename) from SymbolTable
__repr__(self) from SymbolTable
get_children(self) from SymbolTable
get_frees(self)
get_globals(self)
get_id(self) from SymbolTable
get_identifiers(self) from SymbolTable
get_lineno(self) from SymbolTable
get_locals(self)
get_name(self) from SymbolTable
get_parameters(self)
get_symbols(self) from SymbolTable
get_type(self) from SymbolTable
has_children(self) from SymbolTable
has_exec(self) from SymbolTable
has_import_star(self) from SymbolTable
is_nested(self) from SymbolTable
is_optimized(self) from SymbolTable
lookup(self, name) from SymbolTable

 
class Symbol
       
  
__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)

 
class 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 SymbolTableFactory
       
  
__call__(self, table, filename)
__init__(self)
new(self, table, filename)

 
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.1/symtable.pyc'
__name__ = 'symtable'
nested_scopes = Feature((2, 1, 0, 'beta', 1), (2, 2, 0, 'final', 0))
newSymbolTable = <symtable.SymbolTableFactory instance>