RuleSequence

class RuleSequence(rules: List[Tuple[Rule, int | Evaluatable[int]]], label: str | None = None)

A RuleSequence acts as a list of Rule objects with an optional label indicating the name of the sequence.

Defines __iter__, __contains__, __getitem__, and __setitem__ to operate on the list of rules provided.

Parameters:
  • rules – Pairs of (Rule, loop count) in the sequence.

  • label – The name of the sequence.

Attributes

rules

Pairs of (Rule, loop count) in the sequence.

label

The name of the sequence.

Methods

label

The name of the sequence.

rules

Pairs of (Rule, loop count) in the sequence.