Table of Contents

Class: Resolver Twisted-0.19.0/twisted/python/reference.py

I am can resolve backward named references in a block of code.

Objects created by a block of code that are inserted into a dictionary I store a reference to may later indicate a backreference to one of those objects by creating a reference.Reference, specifying the key to be looked up later.

Instantiate me with a lookup table populated with references, then resolve a graph of objects using that table.

Methods   
__init__
res
resdict
resinst
reslist
resolve
  __init__ 
__init__ ( self,  lookup )

Resolver(lookup) Create a resolver.

lookup: is an object which responds to the __getitem__ interface and contains all the keys which can be referred to by the References in the reflist argument to my resolve method.

  res 
res ( self,  obj )

Traverse a single object's graph and resolve it and its subobjects.

  resdict 
resdict ( self,  dict )

Resolve a dictionary; private use

  resinst 
resinst ( self,  inst )

Resolve an instance; private use

  reslist 
reslist ( self,  lst )

Resolve a list; private use

  resolve 
resolve ( self,  reflist )

Resolve a list of references.

Arguments:

reflist: a list of objects which may contain Reference objects, which can be resolved by looking in self.lookup


Table of Contents

This document was automatically generated on Sun Jul 14 19:53:11 2002 by HappyDoc version 2.0