Variable

Implements a variable holder object.

Implements: IVariable

Description

The Variable class allows you to implement a variable holder object.

Constructors

Variable(name: str, value: Optional[Variant] = None)

  • name: str - name of this variable.
  • value: Optional[Variant] - value of this variable.

Properties

name

Name of the variable

name(): str

  • returns: str - variable name.

value

Gets the variable’s value.

value(): Variant

  • returns: Variant - variable value.

Sets the variable’s value.

value(value: Variant)

  • value: Variant - variable’s value.