Utils#

class CallbackList(callback)[source]#

Bases: list

List which invokes a callback after each list modification

append(item)[source]#

Append object to the end of the list.

clear()[source]#

Remove all items from list.

extend(items)[source]#

Extend list by appending elements from the iterable.

insert(index, item)[source]#

Insert object before index.

pop(item)[source]#

Remove and return item at index (default last).

Raises IndexError if list is empty or index is out of range.

remove(item)[source]#

Remove first occurrence of value.

Raises ValueError if the value is not present.

class FrozenList(initial_list=None)[source]#

Bases: Generic[T]

Read-only list, items can also be retrieved by their string representation

count()[source]#

Gets the number of items in the list

Return type:

int

get_list()[source]#

Gets a copy of the list with full access

Return type:

list[TypeVar(T)]

index(item, start=0, stop=9223372036854775807)[source]#

Gets the index of an item

Parameters:
  • item (obj) – Item to be found

  • start (int, optional) – Start index

  • stop (int, optional) – Stop index

Return type:

int

class FrozenObject[source]#

Bases: object

Object to which no members can be added. If members are added, an exception occurs.

class NumericUtils[source]#

Bases: object

Numeric utilities

make_different(value2)[source]#

Guarantees that values are different

Return type:

tuple[float, float]

Parameters:
  • value1 (float)

  • value2 (float)

order(value2)[source]#

Returns floats ordered

Return type:

tuple[float, float]

Parameters:
  • value1 (float)

  • value2 (float)

class PrintUtils[source]#

Bases: object

Utilities for printing

get_space_from_indent()[source]#

Converts indentation level to spaces

Return type:

str

Parameters:

indent (int)