Package cells :: Module cell
[hide private]
[frames] | no frames]

Module cell
source code

Cell, and subclasses of Cell. You will almost certainly never use these directly, instead relying on Model and its subclasses to instantiate these into objects for you.

You should know what these do, though, as you can specify cells.makecell or cells.fun2cell instantiate a specific type of cell for you:
>>> class A(cells.Model):
...     l = cells.makecell(value=[1,3,5], celltype=cells.ListCell)
...     @cells.fun2cell(celltype=cells.RuleThenInputCell)
...     def from_a_global(self, prev):
...         global e
...         return e["something"]


Classes [hide private]
_CellException  
    Only Inherited
LazyCell A RuleCell which does not update upon propogation.
    Cell Types
AlwaysLazyCell A LazyCell variant that is *always* Lazy
DictCell A input cell whose value is initialized to {}.
InputCell A cell whose value can be set
ListCell A input cell whose value is initialized to [].
RuleCell A cell whose value is determined by a function (a rule).
RuleThenInputCell Runs the rule to determine initial value, then acts like a InputCell
UntilAskedLazyCell A LazyCell who converts to a normal RuleCell after its first post-init get()
    Exceptions
EphemeralCellUnboundError An EphemeralCell was getted without being bound.
InputCellRunError An attempt to run() an InputCell was made.
RuleAndValueInitError Both rule and value were passed to __init__.
RuleCellSetError RuleCells may not be set.
SetDuringNotificationError An attempt at a non-deferred set() happened during propogation.

Functions [hide private]
  _debug()
Prints debug messages.
  _nonerule(s, p)

Variables [hide private]
DEBUG Turns on debugging messages for the cell module.

Function Details [hide private]

_debug()

source code 
Prints debug messages.
Returns:
None

_nonerule(s, p)

source code 

Variables Details [hide private]

DEBUG

Turns on debugging messages for the cell module.
Value:
False