Package gavo :: Package rscdef :: Module rmkdef :: Class Rowmaker
[frames] | no frames]

Class Rowmaker

source code

object --+
         |
        Rowmaker

A callable that arranges for the mapping of key/value pairs to other key/value pairs.

Within DaCHS, Rowmakers generate database rows (and parameter dictionaries) from the output of grammars.

They are constructed with the source of the mapping function, a dictionary of globals the function should see, a dictionary of defaults, giving keys to be inserted into the incoming rowdict before the mapping function is called, and a map of line numbers to names handled in that line.

It is called with a dictionary of locals for the functions (i.e., usually the result of a grammar iterRows).

Instance Methods
 
__init__(self, source, name, globals, defaults, lineMap)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__call__(self, vars, table) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, source, name, globals, defaults, lineMap)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)