Skip to content
Back to top
View this page

# ValueAny

class dsviper.ValueAny(initial_value=None)

  Bases: `object`

  A class used to represent a value of any type. Seamless with many Python objects.

  Or use Value.create(Type.ANY [, initial_value]).

  static cast(value: Value) → ValueAny

    Return an any or raise.

  clear() → None

    Clear the container.

  copy() → ValueAny

    Return a deep copy.

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

    Return the description.

  hash() → int

    Return the hash value.

  is_nil() → bool

    Return True if there is no value to unwrap.

  representation() → str

    Return the representation.

  type() → Type

    Return the type.

  type_code() → str

    Return the type code.

  unwrap(*, encoded: bool = True) → _OutputValues

    Return the wrapped value or raise.

  wrap(value: _InputValues) → None

    Wrap a value.