VariableCollection module

class VariableCollection.VariableCollection

Bases: IEnumerable

Represents a collection of variables.

Add(name: str, value: str)

Adds a variable to the collection.

Parameters:
  • name – The name of the variable.

  • value – The value of the variable.

property Count: int

Gets the count of variables.

Returns:

The count of variables.

GetEnumerator() IEnumerator

Gets an enumerator for the collection.

Returns:

An enumerator for the collection.

GetNameByIndex(index: int) str

Gets the name of the variable at the specified index.

Parameters:

index – The index of the variable.

Returns:

The name of the variable.

GetValueByIndex(index: int) str

Gets the value of the variable at the specified index.

Parameters:

index – The index of the variable.

Returns:

The value of the variable.

Remove(name: str)

Removes the variable with the specified name from the collection.

Parameters:

name – The name of the variable to remove.

get_Item(name: str) str

Gets the variable with the specified name.

Parameters:

name – The name of the variable.

Returns:

The value of the variable.

set_Item(name: str, value: str)

Sets the value of the variable with the specified name.

Parameters:
  • name – The name of the variable.

  • value – The value to set.