phileas.iteration.base#

This module contains the definition of the base type and classes used for iteration (data tree, pseudo data tree and iteration tree).

Module Attributes

DataLiteral

Data values that can be used as data tree leaves

Key

Dictionary keys

DataTree

A data tree consists of literal leaves, and dictionary or list nodes

PseudoDataLiteral

A leave of a pseudo data tree is either a data tree leave, or a non-trivial iteration tree leave.

PseudoDataTree

A pseudo data tree is a data tree whose leaves can be non literal iteration leaves.

no_default

You can store this value - instead of an actual default value - in instances of classes that can have a default value, but don't.

Classes

DefaultIndex()

Index of the default value of an iteration tree.

IterationLeaf()

IterationTree()

Represents a set of data trees, as well as the way to iterate over them.

NoDefaultPolicy(value[, names, module, ...])

Behavior of IterationTree.default() for trees not having a default value.

OneWayTreeIterator()

Iterator used in cases where random access iteration is too cumbersome to implement.

TreeIterator(tree)

Iteration tree iterator.

Exceptions

InfiniteLength

Exception raised when requesting the length of an infinite collection.

NoDefaultError(message, path)

Indicates that IterationTree.default() has been called on an iteration tree where a node does not have a default value.