Package cells :: Module synapse :: Class Synapse
[hide private]
[frames] | no frames]

Class Synapse
source code

object --+    
         |    
 cell.Cell --+
             |
            Synapse
Known Subclasses:
ChangeSynapse

A very specialized Cell variant. Synapses are filters for Cells. They can be applied to any type of Cell, and they simply process the cell to build a value which is provided to dependent cells as the filtered cell's value. They live within the cell which defines them, and as such are only referenceable in that rule.

Instance Methods [hide private]
  __init__(self, owner, name=None, **kwargs)
Initialize the synapse Cell, if neccessary.
  __call__(self)
Run Cell.get(self) when a synapse is called as a function.
  run(self)
Slightly modified version of Cell.run().
  rule(self, owner, oldvalue)

Inherited from cell.Cell: add_called_by, add_calls, called_by_list, calls_list, changed, getvalue, propogate, propogation_list, remove_called_bys, remove_cb, reset_calls, set, updatecell

Inherited from object: __delattr__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__


Static Methods [hide private]
  __new__(cls, owner, name=None, **kwargs)
Create a new synapse instance within the calling Cell, if neccessary.

Class Variables [hide private]
initialized  

Inherited from object: __class__


Instance Variables [hide private]

Inherited from cell.Cell: called_by, calls, synapse_space


Method Details [hide private]

__new__(cls, owner, name=None, **kwargs)

source code 
Create a new synapse instance within the calling Cell, if neccessary.
Parameters:
  • cls - Class this synapse is being called from.
  • owner - Model instance this synapse is being created in / retrieved from
  • name - Name of the synapse to retrieve; used as a lookup on the enclosing Cell's synapse space.
  • kwargs - standard Cell keyword arguments.
Returns:
a new object with type S, a subtype of T

Overrides: object.__new__

__init__(self, owner, name=None, **kwargs)
(Constructor)

source code 
Initialize the synapse Cell, if neccessary.
Parameters:
  • owner - The model instance to pass to this synapse's rule
  • name - This synapse's name
  • kwargs - Standard Cell keyword arguments
Returns:
None

Overrides: cell.Cell.__init__

__call__(self)
(Call operator)

source code 
Run Cell.get(self) when a synapse is called as a function.

run(self)

source code 
Slightly modified version of Cell.run().
Returns:
bool

Overrides: cell.Cell.run

rule(self, owner, oldvalue)

source code 

Class Variable Details [hide private]

initialized

Value:
False