A key-value composite where each value is bound with its key’s Sparkle. See Composites: Octopus for the conceptual overview.
Keys are Pods. In Python, strings (and any value polymorphically convertible to Pod) are accepted and auto-converted.
oct = hv.Octopus(hv.Seed128(0, 42), ["color", "shape"], red, circle)
keys := []hv.Pod{hv.NewPod("color"), hv.NewPod("shape")}
oct := hv.NewOctopus(hv.NewSeed128(0, 42), keys, red, circle)
#![allow(unused)]
fn main() {
let keys = vec![Pod::from_word("color"), Pod::from_word("shape")];
let oct = Octopus::new(Seed128::new(0, 42), keys, values);
}
oct.value_by_key("color") # accepts Pod | str | int | Prewired
oct.ValueByKey(hv.NewPod("color")) // HyperBinary — lookup by Pod
#![allow(unused)]
fn main() {
oct.value_by_key(&Pod::from_word("color")) // Option<&HyperBinaryKind>
}