Package analysis :: Module namespace :: Class NamespaceRegister
[show private | hide private]
[frames | no frames]

Class NamespaceRegister


A name register for a given namespace.
Method Summary
  __init__(self, graph, filtered_locals, locals, globals, builtins, specials, name_qualifier, name_context, module_name)
Initialise the register with the following namespaces: 'filtered_locals' Local names whose types have been restricted by the outcomes of various operations.
  add_blocked_node(self, node)
  ensure(self, node, obj)
Using the given 'node', ensure that 'obj' is associated with a name.
  filter(self, node, obj)
Using the given 'node', filter 'obj' from the list of possible types associated with a name.
  get_global_name(self, name)
  get_qualified_name(self, name)
  load(self, node)
Find the name associated with the given 'node' in a namespace.
  make_global(self, node)
Remove the name associated with the given 'node' in the local namespace.
  return_node(self, node)
  set_qualified_name(self, node, found_nodes)
  store(self, node)
Store the name associated with the given 'node' in the local namespace.
  _load_name(self, name)
Find the 'name' in the namespace hierarchy, returning a list of definitions corresponding to that name in the most local namespace possible, along with a scope identifier indicating in which scope the definitions were found.

Method Details

__init__(self, graph, filtered_locals, locals, globals, builtins, specials=None, name_qualifier=None, name_context=None, module_name=None)
(Constructor)

Initialise the register with the following namespaces:

'filtered_locals'   Local names whose types have been restricted by
                    the outcomes of various operations.
'locals'            Local names as defined by parameters or assignment.
'globals'           Global names as defined in the current module.
'builtins'          Names of built-in types, values and functions.
'specials'          An optional namespace principally used to provide
                    names of classes to the code within such classes.
                    Such names appear to be global to namespaces but do
                    not reside in the module global definitions.

The optional 'name_qualifier' is used to qualify certain names.
The optional 'name_context' is used to indicate the kind of local
scope encapsulated by this namespace.
The optional 'module_name' is used to remember which module a name is
defined within.

ensure(self, node, obj)

Using the given 'node', ensure that 'obj' is associated with a name.

filter(self, node, obj)

Using the given 'node', filter 'obj' from the list of possible types associated with a name.

load(self, node)

Find the name associated with the given 'node' in a namespace.

make_global(self, node)

Remove the name associated with the given 'node' in the local namespace. This is used when establishing global usage.

store(self, node)

Store the name associated with the given 'node' in the local namespace.

_load_name(self, name)

Find the 'name' in the namespace hierarchy, returning a list of definitions corresponding to that name in the most local namespace possible, along with a scope identifier indicating in which scope the definitions were found.

Generated by Epydoc 2.1 on Fri May 19 01:52:26 2006 http://epydoc.sf.net