ValueAny¶
- class dsviper.ValueAny(initial_value=None)¶
Bases:
ValueA value of any type. Seamless with many Python objects.
Or use Value.create(Type.ANY [, initial_value]).
- static cast(value: Value | _OutputValues) ValueAny¶
Return value as an any, or raise if it is not one.
- clear() None¶
Clear the container.
- description(*, namespace: NameSpace | None = None) str¶
Return the description of the value it holds, then any, as <value>:any.
namespace qualifies the names inside.
- hash() int¶
Return the hash value.
- is_nil() bool¶
Return True if there is no value to unwrap.
- representation() str¶
Return the value written out: Any(<the value it holds>), or nil when it holds none.
- type_code() str¶
Return the code naming this kind of value, such as “int32”, “struct” or “vector”.
- unwrap(*, encoded: Literal[True] = True) _OutputValues¶
Return the wrapped value or raise.
encoded=False returns a Value rather than a native object.
- wrap(value: _InputValues) None¶
Wrap a value.