ValueTuple¶
- class dsviper.ValueTuple¶
Bases:
ValueA value of type tuple<T0, …>. Seamless with a Python seq[object].
Or use Value.create(type_tuple [, initial_value]).
This constructor builds a new container over the same elements, so only a mutation inside an element shows through.
- at(index: int, *, encoded: Literal[True] = True) _OutputValues¶
Return the value at index.
encoded=False returns a Value rather than a native object.
index runs from 0 to len - 1; anything else is out of range, a negative one included. value[-1] follows Python’s own indexing.
- static cast(value: Value | _OutputValues) ValueTuple¶
Return value as a tuple, or raise if it is not one.
- copy() ValueTuple¶
Return a deep copy.
- description(*, namespace: NameSpace | None = None) str¶
Return the value written out, then its type, as <value>:<type>.
namespace qualifies the type name; representation() gives the value alone.
- empty() bool¶
Return True if the container is empty.
- hash() int¶
Return the hash value.
- replace(index: int, value: _InputValues) ValueTuple¶
Return a copy of the tuple with value at index.
- representation() str¶
Return the value written out: the members between square brackets, comma separated.
- set(index: int, value: _InputValues) None¶
Set the value at index.
- size() int¶
Return the number of elements.
- type_code() str¶
Return the code naming this kind of value, such as “int32”, “struct” or “vector”.