Node types

Node objects are used to represent calculation nodes in dependency tracing. The BaseNode class is the abstract base class for all Node classes. The ItemNode class is for representing elements of Cells objects and Space objects such as UserSpace. An element of a Cells object is identified by arguments to the Cells. If the Cells has a value for the arguments, whether it’s calculted or input, the has_value() returns True and value returns the value. Similarly to the Cells element, an element of a Space is identified by arguments to the Space. Since a call to the Space returns an ItemSpace, the value of the Space’s element is the ItemSpace object if it exists.

BaseNode

class BaseNode(node)[source]

Base class for all Node classes

New in version 0.15.0.

Attributes

args

Return a tuple of the cells’ arguments.

has_value()

Return True if the cell has a value.

obj

Return the Cells object

value

Return the value of the cells.

ItemNode

class ItemNode(node)[source]

Node class to represent elements of Cells and Spaces

This class is for representing elements of Cells objects and Space objects such as UserSpace. An element of a Cells object is identified by arguments to the Cells. If the Cells has a value for the arguments, whether it’s calculted or input, the has_value() returns True and value returns the value. Similarly to the Cells element, an element of a Space is identified by arguments to the Space. Since a call to the Space returns an ItemSpace, the value of the Space’s element is the ItemSpace object if it ever exists.

Changed in version 0.15.0: Renamed to ItemNode from Element.

Attributes

args

Return a tuple of the cells’ arguments.

has_value()

Return True if the cell has a value.

obj

Return the Cells object

value

Return the value of the cells.

preds

A list of nodes that this node refers to.

succs

A list of nodes that refer to this node.

precedents

Return the precedents

ReferenceNode

class ReferenceNode(node)[source]

Attributes

args

Return a tuple of the cells’ arguments.

has_value()

Always returns True as Reference has value

obj

Return the ReferenceProxy object

value

Return the value of the cells.