ValueBool¶
- class dsviper.ValueBool(initial_value)¶
Bases:
ValueA value of type bool. Seamless with a Python bool.
Or use Value.create(Type.BOOL [, True|False]).
- FALSE = false¶
- TRUE = true¶
- static cast(value: Value | _OutputValues) ValueBool¶
Return value as a bool, or raise if it is not one.
- 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.
- encoded() bool¶
Return a Python bool.
- hash() int¶
Return the hash value.
- representation() str¶
Return the value written out: true or false.
- static try_parse(string: str) ValueBool | None¶
Return string parsed as a bool, or None if it does not parse.
- type_code() str¶
Return the code naming this kind of value, such as “int32”, “struct” or “vector”.