designspace.ListDomain#

class designspace.ListDomain(element_kind: TypeKind, element_domain: Domain, element_chart: Chart | None, element_prior: PriorSpec | None, element_periodic: bool, element_quantized: QuantizedSpec | None, element_default: Any, count: int | ArithExpr, list_default: Any = None, element_constraints: Any = ())#

Bases: object

A list of independent copies, declared by .repeat().

Recursive: for a chained or shaped .repeat(2, 3), element_domain is itself a ListDomain.

Every fact about the element lives here rather than on the enclosing ParamDef, which stays chartless, so code looking for a lifted parameter’s chart must read element_chart, not ParamDef.chart. A struct or choice element is the exception: its descendant parameters are separate Space.params entries under a bracketed path such as “edges[].src”.

element_kind#

The element’s type, as a string such as “real” or “choice”.

Type:

str

element_domain#

The element’s own domain, or another ListDomain when lifts nest.

Type:

Domain

element_chart#

The element’s chart, if it has one.

Type:

Chart | None

element_prior#

The element’s declared prior.

Type:

PriorSpec | None

element_periodic#

Whether the element’s domain wraps.

Type:

bool

element_quantized#

The element’s grid, if quantized.

Type:

QuantizedSpec | None

element_default#

The default for each element, set by .default() before .repeat().

Type:

Any

count#

How many elements. An expression here means the length varies between configurations.

Type:

int | ArithExpr

list_default#

The default for the list as a whole, set by .default() after .repeat(). Mutually exclusive with element_default.

Type:

Any

element_constraints#

Constraints declared on a prebuilt element space, held as a template and instantiated per element during evaluation.

Type:

Any