Left#
- class hugr.val.Left(vals: Iterable[Value], right_typ: Iterable[tys.Type])[source]#
Bases:
Sum
Left variant of a
tys.Either
type, containing a list of values.In fallible contexts, this represents the failure variant.
Example
>>> left = Left([TRUE, FALSE], [tys.Bool]) >>> str(left) 'Left(TRUE, FALSE)' >>> str(left.type_()) 'Either((Bool, Bool), Bool)'
Methods
Report the type of the value.
Attributes
n_variants
Tag identifying the variant.
defines all possible variants.
The values of this variant row.