spekk.trees.core.TraversalItem#

class spekk.trees.core.TraversalItem(value: Any, path: tuple, is_leaf: bool)[source]#

Bases: object

An object returned from the traverse() and leaves() generator functions.

__init__(value: Any, path: tuple, is_leaf: bool) None#

Methods

__init__(value, path, is_leaf)

Attributes

value

The value of the node that was traversed onto.

path

The path to the node.

is_leaf

Whether the node is a leaf or not.

is_leaf: bool#

Whether the node is a leaf or not.

path: tuple#

The path to the node.

value: Any#

The value of the node that was traversed onto.