cottax.pytree.consumers.surface.builders module¶
Writing a place using V or a node using N:
V.plasma.ip[0] = GetAttrKey(‘plasma’), GetAttrKey(‘ip’), SequenceKey(0)
- class Keys(into: type[Path], keys: tuple[KeyEntry, ...] = ())[source]¶
Bases:
objectKey Path builder: V or N followed by attribute and index access.
WARNING: a [0] always is a SequenceKey (not a DictKey). Use [DictKey(0)] instead.
Refused: a private or dunder name, which keeps copy, pickle and IPython’s probes from becoming keys.
- entry_of(key: Any)[source]¶
The segment an index writes: a key of a registered key kind (key_kind) as it is, an int a SequenceKey, any other key a DictKey. An index that reads as a number or a slice is refused, and so is a minted segment, which only a mint writes.
- Return type:
KeyEntry
- V = V¶
The root of every place.
- N = N¶
The root of every node name.
- path_of[P: Path](x: Union[Keys, P], into: type[P])[source]¶
x as a into: a builder in that namespace, or a path already one. A root names nothing, and a builder of the other namespace is refused.
- Return type:
P