Skip to content
Back to top
View this page

# ValueTuple

class dsviper.ValueTuple

  Bases: `object`

  A class used to represent a value of type tuple<T0, …>. Seamless with a Python seq[object].

  Or use Value.create(type_tuple [, initial_value]).

  at(index: int, *, encoded: bool = True) → _OutputValues

    Return the value at index.

  static cast(value: Value) → ValueTuple

    Return a tuple or raise.

  copy() → ValueTuple

    Return a deep copy.

  description(*, namespace: NameSpace | None = None) → str

    Return the description.

  empty() → bool

    Remove True if the container is empty.

  hash() → int

    Return the hash value.

  replace(index: int, value: _InputValues) → ValueTuple

    Return a copy of the tuple where the value was replaced.

  representation() → str

    Return the representation.

  set(index: int, value: _InputValues) → None

    Set the value at index.

  size() → int

    Return the number of elements.

  type() → Type

    Return the type.

  type_code() → str

    Return the type code.

  type_tuple() → TypeTuple

    Return the type tuple<T0,…>.