PathComponent¶
- class dsviper.PathComponent¶
Bases:
objectOne step of a Path: what kind of step, and the value it carries.
The kind is one of seven: unwrap, index, key, position and field address into a value; entry and element are the two irregular kinds, which PathEntryKeyInfo and PathElementInfo describe in full.
Note: Not directly instantiable.
- type() str¶
Return which kind of component this is - unwrap, index, key, position, field, entry or element.
- value(*, encoded: Literal[True] = True) _OutputValues¶
Return what the component addresses: void for an unwrap, which reads as None.
A field name, an index, a key or a position. An entry carries the map key whose key it addresses, an element its index in the set’s order; entry_key_info() and element_info() on the path describe them in full.
encoded=False returns it as a Value rather than a native object.