hawk.Quantity

hawk.Quantity#

class hawk.Quantity[source]#

Bases: object

A compound quantity declaration (seam).

slug is the kind-slug namespace segment; name the INSTANCE segment (None namespaces as <slug>__<wire>). reconstruct takes the wire values in order and returns what the author sees.

Methods

__init__(…)

expand()

Every wire's slot, in DECLARATION order — the full span binds whenever the quantity is reached, unread wires included.

leaves()

The wire LEAVES, in declaration order, each carrying its owning quantity so the walk can recover the span.

read()

What a body reads: reconstruct(*wire_leaves), or the wire leaves themselves (a tuple, or the single leaf) with none.

read_with(…)

read(), with every wire leaf passed through wrap — the seam a TRACER binds a quantity parameter through.

wire_name(…)

<kind-slug>__<instance>__<wire> / <kind-slug>__<wire>.

classmethod __new__(*args, **kwargs)#